diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2020-01-26 17:41:19 -0500 |
---|---|---|
committer | worldofpeace <worldofpeace@protonmail.ch> | 2020-01-29 19:05:46 -0500 |
commit | c95612a5a2d4bd93011c042066c6c3deacfd436d (patch) | |
tree | 08448c24e08d760bd8a7717af60a15a0bbf7d547 /nixos/modules | |
parent | 7adffb14cd129e919ccba8a7a285d409065d4357 (diff) |
nixos/display-managers/auto: remove
This module allows root autoLogin, so we would break that for users, but
they shouldn't be using it anyways. This gives the impression like auto
is some special display manager, when it's just lightdm and special pam
rules to allow root autoLogin. It was created for NixOS's testing
so I believe this is where it belongs.
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/rename.nix | 7 | ||||
-rw-r--r-- | nixos/modules/services/x11/display-managers/auto.nix | 68 | ||||
-rw-r--r-- | nixos/modules/services/x11/xserver.nix | 3 |
4 files changed, 8 insertions, 71 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 3dd414ffb0a5..9957fdbb5c40 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -865,7 +865,6 @@ ./services/x11/unclutter.nix ./services/x11/unclutter-xfixes.nix ./services/x11/desktop-managers/default.nix - ./services/x11/display-managers/auto.nix ./services/x11/display-managers/default.nix ./services/x11/display-managers/gdm.nix ./services/x11/display-managers/lightdm.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 26de8a18d922..dbe687d8e22f 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -34,6 +34,13 @@ with lib; as the underlying package isn't being maintained. Working alternatives are libinput and synaptics. '') + (mkRemovedOptionModule [ "services" "xserver" "displayManager" "auto" ] '' + The services.xserver.displayManager.auto module has been removed + because it was only intended for use in internal NixOS tests, and gave the + false impression of it being a special display manager when it's actually + LightDM. Please use the services.xserver.displayManager.lightdm.autoLogin options + instead, or any other display manager in NixOS as they all support auto-login. + '') # Do NOT add any option renames here, see top of the file ]; diff --git a/nixos/modules/services/x11/display-managers/auto.nix b/nixos/modules/services/x11/display-managers/auto.nix deleted file mode 100644 index 1068a344e0cf..000000000000 --- a/nixos/modules/services/x11/display-managers/auto.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ config, lib, ... }: - -with lib; - -let - - dmcfg = config.services.xserver.displayManager; - cfg = dmcfg.auto; - -in - -{ - - ###### interface - - options = { - - services.xserver.displayManager.auto = { - - enable = mkOption { - default = false; - description = '' - Whether to enable the fake "auto" display manager, which - automatically logs in the user specified in the - <option>user</option> option. This is mostly useful for - automated tests. - ''; - }; - - user = mkOption { - default = "root"; - description = "The user account to login automatically."; - }; - - }; - - }; - - - ###### implementation - - config = mkIf cfg.enable { - - services.xserver.displayManager.lightdm = { - enable = true; - autoLogin = { - enable = true; - user = cfg.user; - }; - }; - - # lightdm by default doesn't allow auto login for root, which is - # required by some nixos tests. Override it here. - security.pam.services.lightdm-autologin.text = lib.mkForce '' - auth requisite pam_nologin.so - auth required pam_succeed_if.so quiet - auth required pam_permit.so - - account include lightdm - - password include lightdm - - session include lightdm - ''; - - }; - -} diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 7029919170aa..7f0de96d2084 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -556,8 +556,7 @@ in services.xserver.displayManager.lightdm.enable = let dmconf = cfg.displayManager; - default = !( dmconf.auto.enable - || dmconf.gdm.enable + default = !(dmconf.gdm.enable || dmconf.sddm.enable || dmconf.xpra.enable ); in mkIf (default) true; |