Skip to content

Commit

Permalink
nixos/xserver: clean up the useXFS option
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
xaverdh committed Sep 15, 2020
1 parent cf11567 commit c3be765
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions nixos/modules/services/x11/xserver.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
];


Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit c3be765

Please sign in to comment.