summary refs log tree commit diff
path: root/nixos/modules/services/security
diff options
context:
space:
mode:
authorLeroy Hopson <git@leroy.geek.nz>2015-07-04 18:51:04 +1200
committerLeroy Hopson <git@leroy.geek.nz>2016-02-27 22:25:39 +1300
commiteb90705d456d1bdd64f8e35f07e4acc34d153f5d (patch)
treeb7dcaf3cd29a16f9bba9f9800c05e55b339644bb /nixos/modules/services/security
parentf6f892e2d64445b7eeab56bec9715ba0ffbae10d (diff)
downloadnixlib-eb90705d456d1bdd64f8e35f07e4acc34d153f5d.tar
nixlib-eb90705d456d1bdd64f8e35f07e4acc34d153f5d.tar.gz
nixlib-eb90705d456d1bdd64f8e35f07e4acc34d153f5d.tar.bz2
nixlib-eb90705d456d1bdd64f8e35f07e4acc34d153f5d.tar.lz
nixlib-eb90705d456d1bdd64f8e35f07e4acc34d153f5d.tar.xz
nixlib-eb90705d456d1bdd64f8e35f07e4acc34d153f5d.tar.zst
nixlib-eb90705d456d1bdd64f8e35f07e4acc34d153f5d.zip
fail2ban service: fix formatting of example
Diffstat (limited to 'nixos/modules/services/security')
-rw-r--r--nixos/modules/services/security/fail2ban.nix28
1 files changed, 14 insertions, 14 deletions
diff --git a/nixos/modules/services/security/fail2ban.nix b/nixos/modules/services/security/fail2ban.nix
index 1d3e18dcab25..afbd81be91f2 100644
--- a/nixos/modules/services/security/fail2ban.nix
+++ b/nixos/modules/services/security/fail2ban.nix
@@ -50,20 +50,20 @@ in
 
       jails = mkOption {
         default = { };
-        example =
-          { "apache-nohome-iptables" =
-              ''
-                # Block an IP address if it accesses a non-existent
-                # home directory more than 5 times in 10 minutes,
-                # since that indicates that it's scanning.
-                filter   = apache-nohome
-                action   = iptables-multiport[name=HTTP, port="http,https"]
-                logpath  = /var/log/httpd/error_log*
-                findtime = 600
-                bantime  = 600
-                maxretry = 5
-              '';
-          };
+        example = literalExample ''
+          { apache-nohome-iptables = '''
+              # Block an IP address if it accesses a non-existent
+              # home directory more than 5 times in 10 minutes,
+              # since that indicates that it's scanning.
+              filter   = apache-nohome
+              action   = iptables-multiport[name=HTTP, port="http,https"]
+              logpath  = /var/log/httpd/error_log*
+              findtime = 600
+              bantime  = 600
+              maxretry = 5
+            ''';
+          }
+        '';
         type = types.attrsOf types.lines;
         description =
           ''