types: create fontType option type
This commit is contained in:
parent
4e50809c78
commit
9bddef74df
|
@ -33,4 +33,27 @@ in
|
||||||
foldl' (res: def: mergeAttrs res (def.value self super)) {} defs;
|
foldl' (res: def: mergeAttrs res (def.value self super)) {} defs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fontType = types.submodule {
|
||||||
|
options = {
|
||||||
|
package = mkOption {
|
||||||
|
type = types.nullOr types.package;
|
||||||
|
default = null;
|
||||||
|
example = literalExample "pkgs.dejavu_fonts";
|
||||||
|
description = ''
|
||||||
|
Package providing the font. This package will be installed
|
||||||
|
to your profile. If <literal>null</literal> then the font
|
||||||
|
is assumed to already be available in your profile.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
name = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
example = "DejaVu Sans 8";
|
||||||
|
description = ''
|
||||||
|
The family name and size of the font within the package.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,29 +27,6 @@ let
|
||||||
in
|
in
|
||||||
"${n} = ${v'}";
|
"${n} = ${v'}";
|
||||||
|
|
||||||
fontType = types.submodule {
|
|
||||||
options = {
|
|
||||||
package = mkOption {
|
|
||||||
type = types.nullOr types.package;
|
|
||||||
default = null;
|
|
||||||
example = literalExample "pkgs.dejavu_fonts";
|
|
||||||
description = ''
|
|
||||||
Package providing the font. This package will be installed
|
|
||||||
to your profile. If <literal>null</literal> then the font
|
|
||||||
is assumed to already be available in your profile.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
name = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
example = "DejaVu Sans 8";
|
|
||||||
description = ''
|
|
||||||
The family name and size of the font within the package.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
themeType = types.submodule {
|
themeType = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
|
@ -87,7 +64,7 @@ in
|
||||||
enable = mkEnableOption "GTK 2/3 configuration";
|
enable = mkEnableOption "GTK 2/3 configuration";
|
||||||
|
|
||||||
font = mkOption {
|
font = mkOption {
|
||||||
type = types.nullOr fontType;
|
type = types.nullOr hm.types.fontType;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
The font to use in GTK+ 2/3 applications.
|
The font to use in GTK+ 2/3 applications.
|
||||||
|
|
Loading…
Reference in a new issue