nixos/displayManagers/auto: allow root auto-login
The switch from slim to lightdm in #30890 broke some nixos tests because lightdm by default doesn't permit auto-login for root. Override /etc/pam.d/lightdm-autologin to allow it.
This commit is contained in:
parent
953b77f07b
commit
5f72169b03
1 changed files with 14 additions and 0 deletions
|
@ -49,6 +49,20 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# 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
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue