nixos gdm: use AutomaticLogin if delay is zero. Closes #9843
This commit is contained in:
parent
6644af5910
commit
c94a625585
@ -112,13 +112,21 @@ in
|
|||||||
|
|
||||||
programs.dconf.profiles.gdm = "${gdm}/share/dconf/profile/gdm";
|
programs.dconf.profiles.gdm = "${gdm}/share/dconf/profile/gdm";
|
||||||
|
|
||||||
|
# Use AutomaticLogin if delay is zero, because it's immediate.
|
||||||
|
# Otherwise with TimedLogin with zero seconds the prompt is still
|
||||||
|
# presented and there's a little delay.
|
||||||
environment.etc."gdm/custom.conf".text = ''
|
environment.etc."gdm/custom.conf".text = ''
|
||||||
[daemon]
|
[daemon]
|
||||||
${optionalString cfg.gdm.autoLogin.enable ''
|
${optionalString cfg.gdm.autoLogin.enable (
|
||||||
TimedLoginEnable=true
|
if cfg.gdm.autoLogin.delay > 0 then ''
|
||||||
TimedLogin=${cfg.gdm.autoLogin.user}
|
TimedLoginEnable=true
|
||||||
TimedLoginDelay=${toString cfg.gdm.autoLogin.delay}
|
TimedLogin=${cfg.gdm.autoLogin.user}
|
||||||
''}
|
TimedLoginDelay=${toString cfg.gdm.autoLogin.delay}
|
||||||
|
'' else ''
|
||||||
|
AutomaticLoginEnable=true
|
||||||
|
AutomaticLogin=${cfg.gdm.autoLogin.user}
|
||||||
|
'')
|
||||||
|
}
|
||||||
|
|
||||||
[security]
|
[security]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user