3
0
Fork 0
forked from mirrors/nixpkgs

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.
This commit is contained in:
Eelco Dolstra 2013-10-15 17:22:30 +02:00
parent 0c0bc0857e
commit bbe265e8c2
4 changed files with 31 additions and 32 deletions

View file

@ -239,20 +239,17 @@ in
}; };
}; };
job = mkOption { job = {
default = {};
type = types.uniq types.optionSet;
description = "This option defines how to start the display manager.";
options = {
preStart = mkOption { preStart = mkOption {
type = types.lines;
default = ""; default = "";
example = "rm -f /var/log/my-display-manager.log"; example = "rm -f /var/log/my-display-manager.log";
description = "Script executed before the display manager is started."; description = "Script executed before the display manager is started.";
}; };
execCmd = mkOption { execCmd = mkOption {
type = types.uniq types.string;
example = "${pkgs.slim}/bin/slim"; example = "${pkgs.slim}/bin/slim";
description = "Command to start the display manager."; description = "Command to start the display manager.";
}; };
@ -264,6 +261,7 @@ in
}; };
logsXsession = mkOption { logsXsession = mkOption {
type = types.bool;
default = false; default = false;
description = '' description = ''
Whether the display manager redirects the Whether the display manager redirects the
@ -278,6 +276,4 @@ in
}; };
};
} }

View file

@ -128,7 +128,7 @@ in
services.xserver.displayManager.slim.enable = false; services.xserver.displayManager.slim.enable = false;
services.xserver.displayManager.job = services.xserver.displayManager.job =
{ execCmd = { execCmd = mkFixStrictness
'' ''
mkdir -m 0755 -p /var/lib/kdm mkdir -m 0755 -p /var/lib/kdm
chown kdm /var/lib/kdm chown kdm /var/lib/kdm

View file

@ -89,11 +89,14 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.xserver.displayManager.slim.enable = false;
services.xserver.displayManager.job = { services.xserver.displayManager.job = {
logsXsession = true; logsXsession = true;
# lightdm relaunches itself via just `lightdm`, so needs to be on the PATH # lightdm relaunches itself via just `lightdm`, so needs to be on the PATH
execCmd = '' execCmd = mkFixStrictness ''
export PATH=${lightdm}/sbin:$PATH export PATH=${lightdm}/sbin:$PATH
${lightdm}/sbin/lightdm --log-dir=/var/log --run-dir=/run --config=${lightdmConf} ${lightdm}/sbin/lightdm --log-dir=/var/log --run-dir=/run --config=${lightdmConf}
''; '';

View file

@ -45,7 +45,7 @@ in
services.xserver.displayManager.slim = { services.xserver.displayManager.slim = {
enable = mkOption { enable = mkOption {
default = true; default = config.services.xserver.enable;
description = '' description = ''
Whether to enable SLiM as the display manager. Whether to enable SLiM as the display manager.
''; '';