summary refs log tree commit diff
path: root/nixos/modules/services/x11/xfs.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-30 17:37:45 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-30 18:47:43 +0100
commit408b8b5725c3e6fff75aef772da248d3e95ff414 (patch)
tree692e3b61dbbff85cc97e3becf13a1376dea04a92 /nixos/modules/services/x11/xfs.nix
parentd882e1966251880240599d3c1b31e060661506ee (diff)
downloadnixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.tar
nixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.tar.gz
nixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.tar.bz2
nixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.tar.lz
nixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.tar.xz
nixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.tar.zst
nixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.zip
Add lots of missing option types
Diffstat (limited to 'nixos/modules/services/x11/xfs.nix')
-rw-r--r--nixos/modules/services/x11/xfs.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/nixos/modules/services/x11/xfs.nix b/nixos/modules/services/x11/xfs.nix
index f4a40dbb08fd..44c1d533c3ac 100644
--- a/nixos/modules/services/x11/xfs.nix
+++ b/nixos/modules/services/x11/xfs.nix
@@ -17,6 +17,7 @@ in
     services.xfs = {
 
       enable = mkOption {
+        type = types.bool;
         default = false;
         description = "Whether to enable the X Font Server.";
       };
@@ -28,10 +29,12 @@ in
 
   ###### implementation
 
-  config = mkIf config.services.xfs.enable (
-  mkAssert config.fonts.enableFontDir "
-    Please enable fontDir (fonts.enableFontDir) to use xfs.
-  " {
+  config = mkIf config.services.xfs.enable {
+
+    assertions = singleton
+      { assertion = config.fonts.enableFontDir;
+        message = "Please enable fonts.enableFontDir to use the X Font Server.";
+      };
 
     jobs.xfs =
       { description = "X Font Server";
@@ -41,6 +44,6 @@ in
         exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
       };
 
-  });
+  };
 
 }