diff --git a/modules/lib/types.nix b/modules/lib/types.nix
index 78a875f51..fb871cf81 100644
--- a/modules/lib/types.nix
+++ b/modules/lib/types.nix
@@ -33,4 +33,27 @@ in
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 null 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.
+ '';
+ };
+ };
+ };
+
}
diff --git a/modules/misc/gtk.nix b/modules/misc/gtk.nix
index 1222db4ec..2f080b5b5 100644
--- a/modules/misc/gtk.nix
+++ b/modules/misc/gtk.nix
@@ -27,29 +27,6 @@ let
in
"${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 null 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 {
options = {
package = mkOption {
@@ -87,7 +64,7 @@ in
enable = mkEnableOption "GTK 2/3 configuration";
font = mkOption {
- type = types.nullOr fontType;
+ type = types.nullOr hm.types.fontType;
default = null;
description = ''
The font to use in GTK+ 2/3 applications.