7 dmcfg = config.services.xserver.displayManager;
8 cfg = config.test-support.displayManager.auto;
18 test-support.displayManager.auto = {
22 description = lib.mdDoc ''
23 Whether to enable the fake "auto" display manager, which
24 automatically logs in the user specified in the
25 {option}`user` option. This is mostly useful for
32 description = lib.mdDoc "The user account to login automatically.";
42 config = mkIf cfg.enable {
44 services.xserver.displayManager = {
45 lightdm.enable = true;
52 # lightdm by default doesn't allow auto login for root, which is
53 # required by some nixos tests. Override it here.
54 security.pam.services.lightdm-autologin.text = lib.mkForce ''
55 auth requisite pam_nologin.so
56 auth required pam_succeed_if.so quiet
57 auth required pam_permit.so
59 account include lightdm
61 password include lightdm
63 session include lightdm