more refactoring

This commit is contained in:
chloe 2025-03-23 17:39:15 +01:00
parent dcc640bd56
commit ed7afeba43
20 changed files with 222 additions and 136 deletions

26
shared/ssh.nix Normal file
View file

@ -0,0 +1,26 @@
{
config,
...
}:
{
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
};
services.fail2ban.jails.sshd.settings = {
ssh = ''
enabled = true
port = ssh
filter = sshd
logpath = %(sshd_log)s
maxretry = 5
'';
};
}