diff options
Diffstat (limited to 'nixos/modules/services/x11/xfs.nix')
-rw-r--r-- | nixos/modules/services/x11/xfs.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/xfs.nix b/nixos/modules/services/x11/xfs.nix new file mode 100644 index 000000000000..44c1d533c3ac --- /dev/null +++ b/nixos/modules/services/x11/xfs.nix @@ -0,0 +1,49 @@ +{ config, pkgs, ... }: + +with pkgs.lib; + +let + + configFile = ./xfs.conf; + +in + +{ + + ###### interface + + options = { + + services.xfs = { + + enable = mkOption { + type = types.bool; + default = false; + description = "Whether to enable the X Font Server."; + }; + + }; + + }; + + + ###### implementation + + 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"; + + startOn = "started networking"; + + exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}"; + }; + + }; + +} |