add sabnzbd

This commit is contained in:
Noah Masur 2023-06-03 23:00:18 +00:00
parent d243d68c72
commit fa797c81f8

View File

@ -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"; }];
}];
}
];
};