···112113 programs.dconf.profiles.gdm = "${gdm}/share/dconf/profile/gdm";
114115+ # Use AutomaticLogin if delay is zero, because it's immediate.
116+ # Otherwise with TimedLogin with zero seconds the prompt is still
117+ # presented and there's a little delay.
118 environment.etc."gdm/custom.conf".text = ''
119 [daemon]
120+ ${optionalString cfg.gdm.autoLogin.enable (
121+ if cfg.gdm.autoLogin.delay > 0 then ''
122+ TimedLoginEnable=true
123+ TimedLogin=${cfg.gdm.autoLogin.user}
124+ TimedLoginDelay=${toString cfg.gdm.autoLogin.delay}
125+ '' else ''
126+ AutomaticLoginEnable=true
127+ AutomaticLogin=${cfg.gdm.autoLogin.user}
128+ '')
129+ }
130131 [security]
132