From 8d6b83fec29845a320c77ff42a5de52a6bb38633 Mon Sep 17 00:00:00 2001 From: baritone Date: Tue, 25 Mar 2025 15:08:22 +0100 Subject: [PATCH] added transmission webui --- services/auto-torrent.nix | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/services/auto-torrent.nix b/services/auto-torrent.nix index 0d97048..841c24a 100644 --- a/services/auto-torrent.nix +++ b/services/auto-torrent.nix @@ -10,7 +10,7 @@ sonarr.port = 8989; radarr.port = 7878; jackett.port = 9117; - # transmission.port = 9091; + transmission.port = 9091; }; vm-index = 1; @@ -18,6 +18,7 @@ vm-name = "auto-torrent"; vpn-endpoint = "193.32.248.70"; enable-services = true; + wg-config = "/mnt/wg.confg"; ports-list = pkgs.lib.attrsets.mapAttrsToList (name: value: value.port) ports; in { @@ -110,7 +111,7 @@ in { serviceConfig = { type = "oneshot"; ExecStart = pkgs.writeShellScript "wgconf.sh" '' - ${pkgs.wireguard-tools}/bin/wg-quick up /mnt/wg.conf + ${pkgs.wireguard-tools}/bin/wg-quick up ${wg-config} ''; RemainAfterExit = "yes"; }; @@ -147,12 +148,28 @@ in { services.transmission = pkgs.lib.mkIf enable-services { enable = true; - openFirewall = true; + openPeerPorts = true; openRPCPort = true; home = "/mnt/transmission"; - settings.download-dir = "/mnt/transmission"; - settings.incomplete-dir = "/mnt/transmission/.incomplete"; + webHome = "${pkgs.flood-for-transmission}"; + credentialsFile = "/mnt/transmission-secrets.json"; + settings = { + download-dir = "/mnt/transmission"; + incomplete-dir = "/mnt/transmission/.incomplete"; + peer-port-random-low = 65500; + peer-port-random-high = 65535; + peer-port-random-on-start = true; + download-queue-enabled = false; + + rpc-host-whitelist = builtins.concatStringsSep "," ["transmission.spoodythe.one" "10.0.101.10" "10.0.${toString vm-index}.254" host]; + rpc-whitelist = builtins.concatStringsSep "," ["127.0.0.1" "10.0.101.10" "10.0.${toString vm-index}.254" host]; + rpc-bind-address = "0.0.0.0"; + rpc-authentication-required = true; + rpc-username = "admin"; + }; downloadDirPermissions = "775"; + # performanceNetParameters = true; + # extraFlags = ["--log-info" "--logfile" "/var/log/transmission.log"]; }; # debugging