* 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:
parent
48142d8135
commit
b73424833a
@ -794,8 +794,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
isClone = mkOption {
|
isClone = mkOption {
|
||||||
default = "on";
|
default = true;
|
||||||
example = "off";
|
example = false;
|
||||||
description = "
|
description = "
|
||||||
Whether to enable the X server clone mode for dual-head.
|
Whether to enable the X server clone mode for dual-head.
|
||||||
";
|
";
|
||||||
|
@ -154,9 +154,6 @@ let
|
|||||||
libX11 = pkgs.xlibs.libX11;
|
libX11 = pkgs.xlibs.libX11;
|
||||||
libXext = pkgs.xlibs.libXext;
|
libXext = pkgs.xlibs.libXext;
|
||||||
fontDirectories = import ../system/fonts.nix {inherit pkgs config;};
|
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.
|
# Apache httpd.
|
||||||
@ -168,6 +165,14 @@ let
|
|||||||
(map (job: job.extraHttpdConfig) jobs);
|
(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
|
# Postgres SQL server
|
||||||
++ optional config.services.postgresql.enable
|
++ optional config.services.postgresql.enable
|
||||||
(import ../upstart-jobs/postgresql.nix {
|
(import ../upstart-jobs/postgresql.nix {
|
||||||
|
@ -16,15 +16,6 @@
|
|||||||
|
|
||||||
, # List of font directories.
|
, # List of font directories.
|
||||||
fontDirectories
|
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
|
let
|
||||||
@ -76,7 +67,8 @@ let
|
|||||||
configFile = stdenv.mkDerivation {
|
configFile = stdenv.mkDerivation {
|
||||||
name = "xserver.conf";
|
name = "xserver.conf";
|
||||||
src = ./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 ''
|
synapticsInputDevice = if cfg.isSynaptics then ''
|
||||||
Section "InputDevice"
|
Section "InputDevice"
|
||||||
@ -189,7 +181,7 @@ let
|
|||||||
fi;
|
fi;
|
||||||
|
|
||||||
substituteAll $src $out
|
substituteAll $src $out
|
||||||
'';
|
''; # */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -290,7 +282,7 @@ let
|
|||||||
|
|
||||||
''}
|
''}
|
||||||
|
|
||||||
'';
|
''; # */
|
||||||
|
|
||||||
|
|
||||||
xserverArgs = [
|
xserverArgs = [
|
||||||
@ -372,14 +364,14 @@ rec {
|
|||||||
target = "X11/xkb";
|
target = "X11/xkb";
|
||||||
}
|
}
|
||||||
++
|
++
|
||||||
optional (exportConfiguration)
|
optional cfg.exportConfiguration
|
||||||
{ source = "${configFile}";
|
{ source = "${configFile}";
|
||||||
target = "X11/xorg.conf";
|
target = "X11/xorg.conf";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
job = ''
|
job = ''
|
||||||
start on ${if autorun then "network-interfaces" else "never"}
|
start on ${if cfg.autorun then "network-interfaces" else "never"}
|
||||||
|
|
||||||
start script
|
start script
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user