summary refs log tree commit diff
path: root/nixos/modules/services/x11/xserver.nix
diff options
context:
space:
mode:
authorDominik Xaver Hörl <hoe.dom@gmx.de>2020-04-27 10:51:23 +0200
committerDominik Xaver Hörl <hoe.dom@gmx.de>2020-09-15 14:13:34 +0200
commitc3be76580f0d959506d4369ae9df670829f10fae (patch)
treee4968d271d33806e8e8ba5280a2e95d9af4baa84 /nixos/modules/services/x11/xserver.nix
parentcf115674b04bc03f7b79eface2c4cea5b229cb75 (diff)
downloadnixpkgs-c3be76580f0d959506d4369ae9df670829f10fae.tar
nixpkgs-c3be76580f0d959506d4369ae9df670829f10fae.tar.gz
nixpkgs-c3be76580f0d959506d4369ae9df670829f10fae.tar.bz2
nixpkgs-c3be76580f0d959506d4369ae9df670829f10fae.tar.lz
nixpkgs-c3be76580f0d959506d4369ae9df670829f10fae.tar.xz
nixpkgs-c3be76580f0d959506d4369ae9df670829f10fae.tar.zst
nixpkgs-c3be76580f0d959506d4369ae9df670829f10fae.zip
nixos/xserver: clean up the useXFS option
It had confusing semantics, being somewhere between a boolean option and
a FontPath specification. Introduce fontPath to replace it and mark the
old option as removed.
Diffstat (limited to 'nixos/modules/services/x11/xserver.nix')
-rw-r--r--nixos/modules/services/x11/xserver.nix20
1 files changed, 13 insertions, 7 deletions
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 400173745d3..0552095ba95 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -113,14 +113,14 @@ let
   in concatMapStrings (getAttr "value") monitors;
 
   configFile = pkgs.runCommand "xserver.conf"
-    { xfs = optionalString (cfg.useXFS != false)
-        ''FontPath "${toString cfg.useXFS}"'';
+    { fontpath = optionalString (cfg.fontPath != null)
+        ''FontPath "${cfg.fontPath}"'';
       inherit (cfg) config;
       preferLocalBuild = true;
     }
       ''
         echo 'Section "Files"' >> $out
-        echo $xfs >> $out
+        echo $fontpath >> $out
 
         for i in ${toString fontsForXServer}; do
           if test "''${i:0:''${#NIX_STORE}}" == "$NIX_STORE"; then
@@ -151,6 +151,8 @@ in
       ./desktop-managers/default.nix
       (mkRemovedOptionModule [ "services" "xserver" "startGnuPGAgent" ]
         "See the 16.09 release notes for more information.")
+      (mkRemovedOptionModule ["services" "xserver" "useXFS" ]
+        "Use services.xserver.fontPath instead of useXFS")
     ];
 
 
@@ -481,11 +483,15 @@ in
         description = "Default colour depth.";
       };
 
-      useXFS = mkOption {
-        # FIXME: what's the type of this option?
-        default = false;
+      fontPath = mkOption {
+        type = types.nullOr types.str;
+        default = null;
         example = "unix/:7100";
-        description = "Determines how to connect to the X Font Server.";
+        description = ''
+          Set the X server FontPath. Defaults to null, which
+          means the compiled in defaults will be used. See
+          man xorg.conf for details.
+        '';
       };
 
       tty = mkOption {