diff --git a/modules/sshd.nix b/modules/sshd.nix index 49af4a5..551c0d4 100644 --- a/modules/sshd.nix +++ b/modules/sshd.nix @@ -3,11 +3,17 @@ lib, ... }: { - services.openssh = { - enable = true; - settings = { - PasswordAuthentication = false; - PermitRootLogin = "no"; + services = { + openssh = { + enable = true; + settings = { + PasswordAuthentication = false; + PermitRootLogin = "no"; + }; + }; + fail2ban = { + enable = true; + bantime = "1h"; }; }; }