From 872a31dc8886348b1908045d4ecdc3dfcc71dccc Mon Sep 17 00:00:00 2001 From: Nydragon Date: Mon, 13 Jan 2025 12:47:36 +0100 Subject: [PATCH] chore: change how fail2ban is disabled --- hosts/raptus/fail2ban.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/hosts/raptus/fail2ban.nix b/hosts/raptus/fail2ban.nix index 8d45fd8..3f78de1 100644 --- a/hosts/raptus/fail2ban.nix +++ b/hosts/raptus/fail2ban.nix @@ -1,9 +1,16 @@ -{ pkgs, ... }: { - config = { + pkgs, + lib, + config, + ... +}: +let + inherit (lib) mkIf; + cfg = config.services.fail2ban; +in +{ + config = mkIf cfg.enable { services.fail2ban = { - enable = false; - extraPackages = with pkgs; [ nftables ]; maxretry = 5; bantime = "10m";