4 dmcfg = config.services.xserver.displayManager;
5 cfg = config.test-support.displayManager.auto;
12 test-support.displayManager.auto = {
13 enable = lib.mkOption {
16 Whether to enable the fake "auto" display manager, which
17 automatically logs in the user specified in the
18 {option}`user` option. This is mostly useful for
25 description = "The user account to login automatically.";
32 config = lib.mkIf cfg.enable {
33 services.xserver.displayManager.lightdm.enable = true;
34 services.displayManager.autoLogin = {
39 # lightdm by default doesn't allow auto login for root, which is
40 # required by some nixos tests. Override it here.
41 security.pam.services.lightdm-autologin.text = lib.mkForce ''
42 auth requisite pam_nologin.so
43 auth required pam_succeed_if.so quiet
44 auth required pam_permit.so
46 account include lightdm
48 password include lightdm
50 session include lightdm