nixpkgs-suyu/upstart-jobs/xserver.nix
Eelco Dolstra 79464e0d9c * Don't start X by default.
svn path=/nixos/trunk/; revision=7170
2006-11-29 22:34:59 +00:00

49 lines
793 B
Nix

{ genericSubstituter
, xorgserver
, xf86inputkeyboard
, xf86inputmouse
, xf86videovesa
, # Virtual console for the X server.
tty ? 7
, # X display number.
display ? 0
}:
let
config = genericSubstituter {
name = "xserver.conf";
src = ./xserver.conf;
};
in
rec {
name = "xserver";
job = "
#start on network-interfaces
start script
end script
# !!! -ac is a bad idea.
exec ${xorgserver}/bin/X \\
-ac -nolisten tcp -terminate \\
-logfile /var/log/X.${toString display}.log \\
-fp /var/fonts \\
-modulepath ${xorgserver}/lib/xorg/modules,${xf86inputkeyboard}/lib/xorg/modules/input,${xf86inputmouse}/lib/xorg/modules/input,${xf86videovesa}/lib/xorg/modules/drivers \\
-config ${config} \\
:${toString display} vt${toString tty}
";
}