Files
nix/hosts/common/configs/system/sshd/default.nix
2025-05-29 16:59:00 +01:00

28 lines
470 B
Nix

{ ... }:
{
environment = {
enableAllTerminfo = true;
persistence."/persist/state"."/var/lib/fail2ban" = { };
};
services = {
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PrintMotd = false;
};
};
fail2ban = {
enable = true;
bantime = "24h";
bantime-increment = {
enable = true;
maxtime = "720h";
overalljails = true;
};
};
};
}