mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
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:
parent
0c0bc0857e
commit
bbe265e8c2
@ -239,39 +239,35 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
job = mkOption {
|
||||
default = {};
|
||||
type = types.uniq types.optionSet;
|
||||
description = "This option defines how to start the display manager.";
|
||||
job = {
|
||||
|
||||
options = {
|
||||
preStart = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = "rm -f /var/log/my-display-manager.log";
|
||||
description = "Script executed before the display manager is started.";
|
||||
};
|
||||
|
||||
preStart = mkOption {
|
||||
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.";
|
||||
};
|
||||
|
||||
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>.
|
||||
'';
|
||||
};
|
||||
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>.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
'';
|
||||
|
@ -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.
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user