Skip to content

Commit c3be765

Browse files
committed
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.
1 parent cf11567 commit c3be765

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

nixos/modules/services/x11/xserver.nix

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ let
113113
in concatMapStrings (getAttr "value") monitors;
114114

115115
configFile = pkgs.runCommand "xserver.conf"
116-
{ xfs = optionalString (cfg.useXFS != false)
117-
''FontPath "${toString cfg.useXFS}"'';
116+
{ fontpath = optionalString (cfg.fontPath != null)
117+
''FontPath "${cfg.fontPath}"'';
118118
inherit (cfg) config;
119119
preferLocalBuild = true;
120120
}
121121
''
122122
echo 'Section "Files"' >> $out
123-
echo $xfs >> $out
123+
echo $fontpath >> $out
124124
125125
for i in ${toString fontsForXServer}; do
126126
if test "''${i:0:''${#NIX_STORE}}" == "$NIX_STORE"; then
@@ -151,6 +151,8 @@ in
151151
./desktop-managers/default.nix
152152
(mkRemovedOptionModule [ "services" "xserver" "startGnuPGAgent" ]
153153
"See the 16.09 release notes for more information.")
154+
(mkRemovedOptionModule ["services" "xserver" "useXFS" ]
155+
"Use services.xserver.fontPath instead of useXFS")
154156
];
155157

156158

@@ -481,11 +483,15 @@ in
481483
description = "Default colour depth.";
482484
};
483485

484-
useXFS = mkOption {
485-
# FIXME: what's the type of this option?
486-
default = false;
486+
fontPath = mkOption {
487+
type = types.nullOr types.str;
488+
default = null;
487489
example = "unix/:7100";
488-
description = "Determines how to connect to the X Font Server.";
490+
description = ''
491+
Set the X server FontPath. Defaults to null, which
492+
means the compiled in defaults will be used. See
493+
man xorg.conf for details.
494+
'';
489495
};
490496

491497
tty = mkOption {

0 commit comments

Comments
 (0)