nixos/modules/services/fail2ban.nix

10 lines
385 B
Nix
Raw Normal View History

2023-11-21 20:44:31 +08:00
inputs:
{
2024-03-24 18:23:50 +08:00
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)
2023-11-21 20:44:31 +08:00
{
2024-03-24 18:23:50 +08:00
services.fail2ban = { enable = true; ignoreIP = [ "127.0.0.0/8" "192.168.0.0/16" "vps6.chn.moe" ]; };
2023-11-21 20:44:31 +08:00
};
}