summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorsils <sils@sils.li>2024-01-05 18:04:22 +0100
committerSoispha <soispha@vhack.eu>2024-01-06 12:13:03 +0100
commit0b8b7c6f622ec04c50b58b30899f6e28650cdfea (patch)
tree3b02dfae663ede4e49993466c9cae3a7f7933d82
parentfeat(system/services/matrix): use mautrix-whatsapp module provided by (diff)
downloadnixos-server-0b8b7c6f622ec04c50b58b30899f6e28650cdfea.tar.gz
nixos-server-0b8b7c6f622ec04c50b58b30899f6e28650cdfea.zip
feat(system/services/fail2ban): define config in daemonSettings
This isn't strictly necessary as we define the default config
-rw-r--r--system/services/fail2ban/default.nix15
1 files changed, 8 insertions, 7 deletions
diff --git a/system/services/fail2ban/default.nix b/system/services/fail2ban/default.nix
index 43fd674..66207e6 100644
--- a/system/services/fail2ban/default.nix
+++ b/system/services/fail2ban/default.nix
@@ -2,13 +2,14 @@
   services.fail2ban = {
     enable = true;
     maxretry = 2; # ban after 2 failures
-    daemonConfig = ''
-      [Definition]
-      logtarget = SYSLOG
-      socket    = /run/fail2ban/fail2ban.sock
-      pidfile   = /run/fail2ban/fail2ban.pid
-      dbfile    = /var/lib/fail2ban/db.sqlite3
-    '';
+    daemonSettings = {
+      Definition = {
+        logtarget = "SYSLOG";
+        socket = "/run/fail2ban/fail2ban.sock";
+        pidfile = "/run/fail2ban/fail2ban.pid";
+        dbfile = "/var/lib/fail2ban/db.sqlite3";
+      };
+    };
     bantime-increment = {
       enable = true;
       rndtime = "8m";