Fantastic!
It works.
Thank you for your detailed explanations.
M.
On Jan 28, 2009, at 2:28 PM, Marc Weber wrote:
How can I explain this to my /etc/nixos/configuration.nix ?
I tryed to look inside the nix scripts in /etc/nixos/nixos but I'm
lost.
Hi Marco,
xserver is started by an upstart job. All upstart descriptions can be
found in the nixos repo within the upstart-jobs directory.
There is also upstart-jobs/xserver.nix.
You want to look for the
[..]
env SLIM_CFGFILE=${slimConfig}
[..]
start script
[..]
end script section
[..]
From there on you can continue following the slimConfig definition:
slimConfig = pkgs.writeText "slim.cfg" ''
[..]
xserver_arguments ${toString xserverArgs}
[..]
'';
xserverArgs = [
[..]
"-config ${configFile}"
[...]
] [...]
will make you read about :
configFile = stdenv.mkDerivation {
name = "xserver.conf"; <<< derivation name. Not important
src = ./xserver.conf; <<<<<<<<<<<<<<<< template file
inherit fontsForXServer videoDriver resolutions;
isClone = if cfg.isClone then "on" else "off";
so finally you end up reading
nixos/upstart-jobs/./xserver.con
noticing those strange @foo@ subtitution regions.
They are replaced by values form the builder environment.
Eg note the inherit line above.
the /etc/nixos/configuration.nix settings will show up in
# Abbreviations.
cfg = config.services.xserver;
I hope you can guess how to extend this configuration scheme now.
Marc
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev