about summary refs log tree commit diff
path: root/modules/nixos/shadowsocks.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-07-13 07:39:07 +0300
committerAzat Bahawi <azat@bahawi.net>2023-07-13 07:39:07 +0300
commit138ff2ae32facaf4f2c072115b1b0f64f05f615a (patch)
tree1853385d7b07b92c3eb84439170fc719e56cf2c4 /modules/nixos/shadowsocks.nix
parent2023-07-09 (diff)
2023-07-13
Diffstat (limited to 'modules/nixos/shadowsocks.nix')
-rw-r--r--modules/nixos/shadowsocks.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/nixos/shadowsocks.nix b/modules/nixos/shadowsocks.nix
index f9997ba..7307933 100644
--- a/modules/nixos/shadowsocks.nix
+++ b/modules/nixos/shadowsocks.nix
@@ -29,11 +29,13 @@ in {
         mode = "tcp_only";
       };
 
-      fail2ban.jails.shadowsocks-libev = ''
-        enabled = true
-        filter = shadowsocks-libev
-        port = ${toString cfg.port}
-      '';
+      fail2ban.jails.shadowsocks-libev = {
+        enabled = true;
+        settings = {
+          filter = "shadowsocks-libev";
+          inherit (cfg) port;
+        };
+      };
     };
 
     systemd.services.shadowsocks-libev.path = with pkgs;

Consider giving Nix/NixOS a try! <3