From 0b8b7c6f622ec04c50b58b30899f6e28650cdfea Mon Sep 17 00:00:00 2001 From: sils Date: Fri, 5 Jan 2024 18:04:22 +0100 Subject: feat(system/services/fail2ban): define config in daemonSettings This isn't strictly necessary as we define the default config --- system/services/fail2ban/default.nix | 15 ++++++++------- 1 file 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"; -- cgit 1.4.1