mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +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
4 changed files with 31 additions and 32 deletions
|
@ -239,39 +239,35 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
job = mkOption {
|
job = {
|
||||||
default = {};
|
|
||||||
type = types.uniq types.optionSet;
|
|
||||||
description = "This option defines how to start the display manager.";
|
|
||||||
|
|
||||||
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 {
|
execCmd = mkOption {
|
||||||
default = "";
|
type = types.uniq types.string;
|
||||||
example = "rm -f /var/log/my-display-manager.log";
|
example = "${pkgs.slim}/bin/slim";
|
||||||
description = "Script executed before the display manager is started.";
|
description = "Command to start the display manager.";
|
||||||
};
|
};
|
||||||
|
|
||||||
execCmd = mkOption {
|
environment = mkOption {
|
||||||
example = "${pkgs.slim}/bin/slim";
|
default = {};
|
||||||
description = "Command to start the display manager.";
|
example = { SLIM_CFGFILE = /etc/slim.conf; };
|
||||||
};
|
description = "Additional environment variables needed by 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>.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
|
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.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
|
||||||
|
|
|
@ -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}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -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.
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue