Fix autologin

This commit is contained in:
jalr 2021-12-04 11:14:06 +00:00
parent d11b8fd75a
commit 6c02f2962a

View file

@ -19,13 +19,18 @@ in
after = [ "systemd-logind.service" ]; # without it user session not started and xorg can't be run from this tty
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = [
"" # override upstream default with an empty ExecStart
"@${pkgs.utillinux}/sbin/agetty agetty --login-program ${pkgs.shadow}/bin/login --autologin '${cfg.autologin.username}' --noclear %I $TERM"
];
Restart = "always";
Type = "idle";
};
};
systemd.services."autovt@" = {
serviceConfig = lib.mkForce {
ExecStart = [
"" # override upstream default with an empty ExecStart
"@${pkgs.utillinux}/sbin/agetty agetty --login-program ${pkgs.shadow}/bin/login --autologin '${cfg.autologin.username}' --noclear %I $TERM"
];
restartIfChanged = false;
};
};
};
}