{ self, config, lib, pkgs, ... }: { imports = [ ]; nixpkgs.overlays = with self.overlays; [ flaresolverr ]; users.groups."torrent".members = [ "op" "sonarr" "radarr" "bazarr" "jackett" "lidarr" "jellyfin" "transmission" ]; users.users.torrent = { isNormalUser = true; extraGroups = [ "wheel" "tty" ]; }; services.transmission = { enable = true; openFirewall = true; openRPCPort = true; user = "torrent"; settings = { download-dir = "/torrents"; incomplete-dir = "/.incomplete"; rpc-bind-address = "0.0.0.0"; rpc-whitelist = "127.0.0.1,10.0.0.1,192.168.*.*,100.64.*.*"; }; }; services.nginx.virtualHosts."torrent.${config.networking.hostName}" = { listen = [{ port = 80; addr = "0.0.0.0"; }]; locations."/" = { proxyPass = "http://127.0.0.1:9091"; }; }; services.sonarr = { enable = true; openFirewall = true; group = "torrent"; }; services.nginx.virtualHosts."sonarr.${config.networking.hostName}" = { listen = [{ port = 80; addr = "0.0.0.0"; }]; locations."/" = { proxyPass = "http://127.0.0.1:8989"; }; }; services.radarr = { enable = true; openFirewall = true; group = "torrent"; }; services.nginx.virtualHosts."radarr.${config.networking.hostName}" = { listen = [{ port = 80; addr = "0.0.0.0"; }]; locations."/" = { proxyPass = "http://127.0.0.1:7878"; }; }; services.bazarr = { enable = true; openFirewall = true; group = "torrent"; }; services.nginx.virtualHosts."bazarr.${config.networking.hostName}" = { listen = [{ port = 80; addr = "0.0.0.0"; }]; locations."/" = { proxyPass = "http://127.0.0.1:6767"; }; }; services.jackett = { enable = true; openFirewall = true; group = "torrent"; }; services.nginx.virtualHosts."jackett.${config.networking.hostName}" = { listen = [{ port = 80; addr = "0.0.0.0"; }]; locations."/" = { proxyPass = "http://127.0.0.1:9117"; }; }; services.lidarr = { enable = true; openFirewall = true; group = "torrent"; }; services.nginx.virtualHosts."lidarr.${config.networking.hostName}" = { listen = [{ port = 80; addr = "0.0.0.0"; }]; locations."/" = { proxyPass = "http://127.0.0.1:8686"; }; }; services.flaresolverr.enable = true; }