From fa797c81f83546e78dea764fcedb3176d8fc4367 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sat, 3 Jun 2023 23:00:18 +0000 Subject: [PATCH] add sabnzbd --- modules/nixos/services/arr.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/nixos/services/arr.nix b/modules/nixos/services/arr.nix index 825448c..5539fba 100644 --- a/modules/nixos/services/arr.nix +++ b/modules/nixos/services/arr.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: { +{ config, pkgs, lib, ... }: { options = { arrServer = lib.mkOption { @@ -14,11 +14,14 @@ services.radarr.enable = true; services.bazarr.enable = true; services.prowlarr.enable = true; + services.sabnzbd.enable = true; + unfreePackages = [ "unrar" ]; # Required for sabnzbd # Grant users access to destination directories users.users.sonarr.extraGroups = [ "jellyfin" ]; users.users.radarr.extraGroups = [ "jellyfin" ]; users.users.bazarr.extraGroups = [ "jellyfin" ]; + users.users.sabnzbd.extraGroups = [ "jellyfin" ]; # Requires updating the base_url config value in each service # If you try to rewrite the URL, the service won't redirect properly @@ -67,6 +70,17 @@ upstreams = [{ dial = "localhost:6767"; }]; }]; } + { + group = "download"; + match = [{ + host = [ config.arrServer ]; + path = [ "/sabnzbd*" ]; + }]; + handle = [{ + handler = "reverse_proxy"; + upstreams = [{ dial = "localhost:8085"; }]; + }]; + } ]; };