nixpkgs-suyu/modules/services/x11/xfs.nix
Eelco Dolstra 83a9bf9a6a * Change all the startOn / stopOn attributes to the Upstart 0.6 syntax
(e.g., startOn = "started foo" instead of startOn = "foo").

svn path=/nixos/branches/upstart-0.6/; revision=18230
2009-11-06 22:19:17 +00:00

53 lines
850 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 = "started ${startingDependency}";
exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
};
};
}