From fbd804939f9a2f13b97f465d83b2a5715d6ac232 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:51:31 +0200 Subject: [PATCH] update --- hosts/server/modules/jackflix/default.nix | 36 +++++++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/hosts/server/modules/jackflix/default.nix b/hosts/server/modules/jackflix/default.nix index a32de41..b27eed6 100644 --- a/hosts/server/modules/jackflix/default.nix +++ b/hosts/server/modules/jackflix/default.nix @@ -66,11 +66,35 @@ in { openFirewall = true; }; - # transmission = { - # enable = true; - # user = "jackflix"; - # group = "media"; - # openFirewall = true; - # }; + transmission = { + enable = true; + user = "nixarr"; + group = "nixarr"; + openFirewall = true; + settings = { + "rpc-bind-address" = "192.168.15.1"; # Bind RPC/WebUI to bridge address + }; + }; + }; + + # Define VPN network namespace + vpnnamespaces.wg = { + enable = true; + wireguardConfigFile = "/data/.secret/wg.conf"; + accessibleFrom = [ "192.168.1.0/24" ]; + portMappings = [{ + from = 9091; + to = 9091; + }]; + openVPNPorts = [{ + port = 60729; + protocol = "both"; + }]; + }; + + # Add systemd service to VPN network namespace. + systemd.services.transmission.vpnconfinement = { + enable = true; + vpnnamespace = "wg"; }; }