.github
.vscode
docs
hydra
keys
lib
modules
autopull.nix
base.nix
boot.nix
docker.nix
endlessh.nix
fail2ban.nix
generators.nix
kub_net.nix
libs.nix
locale.nix
nix.nix
openssh.nix
pam-fingerprint-swap.nix
plocate.nix
programs.nix
update.nix
yubikey.nix
systems
users
utils
.envrc
.gitconfig
.gitignore
.sops.yaml
CONTRIBUTING.md
README.md
checks.nix
flake.lock
flake.nix
shell.nix
sops-mergetool.sh
statix.toml
treefmt.toml
15 lines
368 B
Nix
15 lines
368 B
Nix
{ config, lib, ... }:
|
|
{
|
|
services.fail2ban = {
|
|
enable = lib.mkIf config.networking.firewall.enable (lib.mkDefault true);
|
|
maxretry = 5;
|
|
bantime = "24h";
|
|
bantime-increment = {
|
|
enable = true;
|
|
formula = "ban.Time * math.exp(float(ban.Count+1)*banFactor)/math.exp(1*banFactor)";
|
|
maxtime = "168h";
|
|
overalljails = true;
|
|
};
|
|
};
|
|
}
|