Files
radicle-infra/os/mixin/ssh.nix
T

32 lines
511 B
Nix

{
pkgs,
config,
lib,
...
}: {
services = {
fail2ban = {
enable = true;
bantime = "72h";
bantime-increment.enable = true;
};
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
};
hostKeys = [
{
path = "/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
];
};
sshguard.enable = true;
};
sops.age.sshKeyPaths = map (x: x.path) config.services.openssh.hostKeys;
}