22 lines
525 B
Nix
22 lines
525 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: {
|
|
services.openssh = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
settings = {
|
|
PasswordAuthentication = false;
|
|
KbdInteractiveAuthentication = false;
|
|
PermitRootLogin = "no";
|
|
AllowUsers = ["nick" "gitea"];
|
|
MaxAuthTries = 3;
|
|
PerSourcePenalties = "crash:3600s authfail:3600s max:86400s";
|
|
};
|
|
};
|
|
users.users."nick".openssh.authorizedKeys.keys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJwouafzGDRGeMJQbm9ME/1CSkXicdL7TthJjWkhyLYd nick@Theseus"
|
|
];
|
|
}
|