nixos/modules/services/fail2ban.nix
2024-03-24 18:23:50 +08:00

10 lines
385 B
Nix

inputs:
{
options.nixos.services.fail2ban = let inherit (inputs.lib) mkOption types; in mkOption
{ type = types.nullOr (types.submodule {}); default = null; };
config = let inherit (inputs.config.nixos.services) fail2ban; in inputs.lib.mkIf (fail2ban != null)
{
services.fail2ban = { enable = true; ignoreIP = [ "127.0.0.0/8" "192.168.0.0/16" "vps6.chn.moe" ]; };
};
}