ssh: Migrate to 23.05 format

This commit is contained in:
Simon Bruder 2023-05-30 11:35:13 +02:00
parent fa6941bfa0
commit d43a2e51b5
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -2,16 +2,11 @@
{
services.openssh = {
enable = true;
} // (if (lib.versionAtLeast (lib.substring 0 5 lib.version) "23.05") then {
# TODO: Remove with 23.05
settings = {
permitRootLogin = "yes";
passwordAuthentication = false;
PermitRootLogin = "yes";
PasswordAuthentication = false;
};
} else {
permitRootLogin = "yes";
passwordAuthentication = false;
});
};
users.users.root.openssh.authorizedKeys.keys = config.sbruder.pubkeys.trustedKeys;