mirror of
https://seed.radicle.dev/rad:z254T5p17bdFPmzfDojsdjo4HjpoZ.git
synced 2026-11-21 10:30:44 +08:00
32 lines
511 B
Nix
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;
|
|
}
|