* xserver.nix: remove some unnecessary function arguments.

* isClone: changed into a boolean rather than a string "on" or "off".

svn path=/nixos/trunk/; revision=10067
This commit is contained in:
Eelco Dolstra 2008-01-04 10:36:14 +00:00
parent 48142d8135
commit b73424833a
3 changed files with 16 additions and 19 deletions

View File

@ -794,8 +794,8 @@
};
isClone = mkOption {
default = "on";
example = "off";
default = true;
example = false;
description = "
Whether to enable the X server clone mode for dual-head.
";

View File

@ -154,9 +154,6 @@ let
libX11 = pkgs.xlibs.libX11;
libXext = pkgs.xlibs.libXext;
fontDirectories = import ../system/fonts.nix {inherit pkgs config;};
isClone = config.services.xserver.isClone;
autorun = config.services.xserver.autorun;
exportConfiguration = config.services.xserver.exportConfiguration;
})
# Apache httpd.
@ -168,6 +165,14 @@ let
(map (job: job.extraHttpdConfig) jobs);
})
# Apache httpd (new style).
/*
++ optional config.services.httpd.enable
(import ../upstart-jobs/apache-httpd {
inherit config pkgs;
})
*/
# Postgres SQL server
++ optional config.services.postgresql.enable
(import ../upstart-jobs/postgresql.nix {

View File

@ -16,15 +16,6 @@
, # List of font directories.
fontDirectories
, # Is Clone mode on?
isClone ? "on"
, # Do we want it to run or just to prepare everything?
autorun ? true
, # Create unneeded links in /etc?
exportConfiguration ? false
}:
let
@ -76,7 +67,8 @@ let
configFile = stdenv.mkDerivation {
name = "xserver.conf";
src = ./xserver.conf;
inherit fontDirectories videoDriver resolutions isClone;
inherit fontDirectories videoDriver resolutions;
isClone = if cfg.isClone then "on" else "off";
synapticsInputDevice = if cfg.isSynaptics then ''
Section "InputDevice"
@ -189,7 +181,7 @@ let
fi;
substituteAll $src $out
'';
''; # */
};
@ -290,7 +282,7 @@ let
''}
'';
''; # */
xserverArgs = [
@ -372,14 +364,14 @@ rec {
target = "X11/xkb";
}
++
optional (exportConfiguration)
optional cfg.exportConfiguration
{ source = "${configFile}";
target = "X11/xorg.conf";
};
job = ''
start on ${if autorun then "network-interfaces" else "never"}
start on ${if cfg.autorun then "network-interfaces" else "never"}
start script