system/modules/nixos/services/fail2ban/fail2ban.nix

22 lines
367 B
Nix
Raw Normal View History

2024-04-16 02:51:46 +03:00
{ config, lib, ... }:
let
cfg = config.local.services.fail2ban;
in
{
options.local.services.fail2ban = with lib; {
enable = mkEnableOption "fail2ban";
};
config = lib.mkIf cfg.enable {
services.fail2ban = {
enable = true;
bantime-increment = {
enable = true;
factor = "4";
maxtime = "48h";
};
};
};
}