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.";
+ 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
- ~/.xsession-errors.
- '';
- };
+ 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
+ ~/.xsession-errors.
+ '';
};
};
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.
'';