[Nix-dev] xserver ignores custom vesa modes

Marc Weber marco-oweber at gmx.de
Wed Jan 28 14:28:34 CET 2009


>  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



More information about the nix-dev mailing list