nixpkgs/modules/services/x11/xfs.nix
Eelco Dolstra eba8f94069 * jobAttrs -> jobs.
svn path=/nixos/trunk/; revision=17769
2009-10-12 18:09:34 +00:00

55 lines
879 B
Nix

{ config, pkgs, ... }:
with pkgs.lib;
let
configFile = ./xfs.conf;
startingDependency =
if config.services.gw6c.enable && config.services.gw6c.autorun
then "gw6c"
else "network-interfaces";
in
{
###### interface
options = {
services.xfs = {
enable = mkOption {
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 fontDir (fonts.enableFontDir) to use xfs.";
};
jobs.xfs =
{ description = "X Font Server";
startOn = "${startingDependency}/started";
stopOn = "shutdown";
exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
};
};
}