ssh: Migrate to 23.05 format

nazuna
Simon Bruder 2023-05-30 11:35:13 +02:00
parent fa6941bfa0
commit d43a2e51b5
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
1 changed files with 3 additions and 8 deletions

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;