diff --git a/system/options.nix b/system/options.nix index 0a24134a30e..f22f1ee42ec 100644 --- a/system/options.nix +++ b/system/options.nix @@ -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. "; diff --git a/upstart-jobs/default.nix b/upstart-jobs/default.nix index cdeb5806369..e6cb2a61580 100644 --- a/upstart-jobs/default.nix +++ b/upstart-jobs/default.nix @@ -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 { diff --git a/upstart-jobs/xserver.nix b/upstart-jobs/xserver.nix index e0cdb6b2f9e..2d45f0015e8 100644 --- a/upstart-jobs/xserver.nix +++ b/upstart-jobs/xserver.nix @@ -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