diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-15 17:22:30 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-15 17:24:33 +0200 |
commit | bbe265e8c291d542f5f5a9ea0217e78b4ba6624e (patch) | |
tree | 8ab6e1080e5987c0f3ef30bc16420e1a11c08e48 /nixos | |
parent | 0c0bc0857ed459a7e4b6b54fe768828fee9737cd (diff) | |
download | nixlib-bbe265e8c291d542f5f5a9ea0217e78b4ba6624e.tar nixlib-bbe265e8c291d542f5f5a9ea0217e78b4ba6624e.tar.gz nixlib-bbe265e8c291d542f5f5a9ea0217e78b4ba6624e.tar.bz2 nixlib-bbe265e8c291d542f5f5a9ea0217e78b4ba6624e.tar.lz nixlib-bbe265e8c291d542f5f5a9ea0217e78b4ba6624e.tar.xz nixlib-bbe265e8c291d542f5f5a9ea0217e78b4ba6624e.tar.zst nixlib-bbe265e8c291d542f5f5a9ea0217e78b4ba6624e.zip |
slim: Only enable if the X server is enabled
http://hydra.nixos.org/build/6494972 Disabling slim revealed that services.xserver.displayManager.job had an incorrect type, so fixed that as well.
Diffstat (limited to 'nixos')
4 files changed, 34 insertions, 35 deletions
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index c7599e245b05..91de910662f2 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -239,39 +239,35 @@ in }; }; - job = mkOption { - default = {}; - type = types.uniq types.optionSet; - description = "This option defines how to start the display manager."; - - options = { - - preStart = mkOption { - default = ""; - example = "rm -f /var/log/my-display-manager.log"; - description = "Script executed before the display manager is started."; - }; - - execCmd = mkOption { - example = "${pkgs.slim}/bin/slim"; - description = "Command to start the display manager."; - }; - - environment = mkOption { - default = {}; - example = { SLIM_CFGFILE = /etc/slim.conf; }; - description = "Additional environment variables needed by the display manager."; - }; - - logsXsession = mkOption { - default = false; - description = '' - Whether the display manager redirects the - output of the session script to - <filename>~/.xsession-errors</filename>. - ''; - }; + job = { + preStart = mkOption { + type = types.lines; + default = ""; + example = "rm -f /var/log/my-display-manager.log"; + description = "Script executed before the display manager is started."; + }; + + execCmd = mkOption { + type = types.uniq types.string; + example = "${pkgs.slim}/bin/slim"; + description = "Command to start the display manager."; + }; + + environment = mkOption { + default = {}; + example = { SLIM_CFGFILE = /etc/slim.conf; }; + description = "Additional environment variables needed by the display manager."; + }; + + logsXsession = mkOption { + type = types.bool; + default = false; + description = '' + Whether the display manager redirects the + output of the session script to + <filename>~/.xsession-errors</filename>. + ''; }; }; diff --git a/nixos/modules/services/x11/display-managers/kdm.nix b/nixos/modules/services/x11/display-managers/kdm.nix index 2e84adcb4cef..c03f71164541 100644 --- a/nixos/modules/services/x11/display-managers/kdm.nix +++ b/nixos/modules/services/x11/display-managers/kdm.nix @@ -128,7 +128,7 @@ in services.xserver.displayManager.slim.enable = false; services.xserver.displayManager.job = - { execCmd = + { execCmd = mkFixStrictness '' mkdir -m 0755 -p /var/lib/kdm chown kdm /var/lib/kdm diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix index 266f16e18e30..f4fb5ee003a9 100644 --- a/nixos/modules/services/x11/display-managers/lightdm.nix +++ b/nixos/modules/services/x11/display-managers/lightdm.nix @@ -89,11 +89,14 @@ in }; config = mkIf cfg.enable { + + services.xserver.displayManager.slim.enable = false; + services.xserver.displayManager.job = { logsXsession = true; # lightdm relaunches itself via just `lightdm`, so needs to be on the PATH - execCmd = '' + execCmd = mkFixStrictness '' export PATH=${lightdm}/sbin:$PATH ${lightdm}/sbin/lightdm --log-dir=/var/log --run-dir=/run --config=${lightdmConf} ''; diff --git a/nixos/modules/services/x11/display-managers/slim.nix b/nixos/modules/services/x11/display-managers/slim.nix index 7b2c52ca3989..01c9fa96c8c8 100644 --- a/nixos/modules/services/x11/display-managers/slim.nix +++ b/nixos/modules/services/x11/display-managers/slim.nix @@ -45,7 +45,7 @@ in services.xserver.displayManager.slim = { enable = mkOption { - default = true; + default = config.services.xserver.enable; description = '' Whether to enable SLiM as the display manager. ''; |