diff options
author | Izorkin <izorkin@elven.pw> | 2019-09-03 21:57:25 +0300 |
---|---|---|
committer | Izorkin <izorkin@elven.pw> | 2020-01-29 23:15:56 +0300 |
commit | 182012ef4367bede2531e56c2190353ebe539f23 (patch) | |
tree | d1381e02db21c24bec557e60f4fbd75b1bfaf1de | |
parent | 68d601d65c793caa429578fff3d1d6800d0be809 (diff) | |
download | nixlib-182012ef4367bede2531e56c2190353ebe539f23.tar nixlib-182012ef4367bede2531e56c2190353ebe539f23.tar.gz nixlib-182012ef4367bede2531e56c2190353ebe539f23.tar.bz2 nixlib-182012ef4367bede2531e56c2190353ebe539f23.tar.lz nixlib-182012ef4367bede2531e56c2190353ebe539f23.tar.xz nixlib-182012ef4367bede2531e56c2190353ebe539f23.tar.zst nixlib-182012ef4367bede2531e56c2190353ebe539f23.zip |
nixos/fail2ban: add options to enable work service with iptables-compat
-rw-r--r-- | nixos/modules/services/security/fail2ban.nix | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nixos/modules/services/security/fail2ban.nix b/nixos/modules/services/security/fail2ban.nix index d933ae02e422..eb4a4f2eb51d 100644 --- a/nixos/modules/services/security/fail2ban.nix +++ b/nixos/modules/services/security/fail2ban.nix @@ -55,6 +55,13 @@ in description = "The fail2ban package to use for running the fail2ban service."; }; + packageFirewall = mkOption { + default = pkgs.iptables; + type = types.package; + example = "pkgs.nftables"; + description = "The firewall package used by fail2ban service."; + }; + daemonConfig = mkOption { default = '' [Definition] @@ -103,7 +110,6 @@ in }; - ###### implementation config = mkIf cfg.enable { @@ -131,7 +137,7 @@ in restartTriggers = [ fail2banConf jailConf pathsConf ]; reloadIfChanged = true; - path = [ cfg.package pkgs.iptables pkgs.iproute ]; + path = [ cfg.package cfg.packageFirewall pkgs.iproute ]; preStart = '' mkdir -p /var/lib/fail2ban |