nixpkgs/upstart-jobs/xserver.nix
Eelco Dolstra 8532f2be8e * Add the X server as an Upstart service. The X server is pure,
except for the fonts, which are still hardcoded.  The current
  configuration uses the VESA driver, which should work on most
  machines.  Of course, the configuration should now be generated from
  a higher-level specification.

svn path=/nixos/trunk/; revision=7165
2006-11-28 22:27:56 +00:00

50 lines
792 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}
";
}