From f44863c4e6b70f729fe3b50c30b2233c591cc3f7 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sat, 15 Nov 2025 01:42:13 +0100 Subject: [PATCH] Services/Sabnzbd: Split into separate instances for movies/shows --- system/servenix/default.nix | 3 +- .../{sabnzbd.nix => sabnzbd-movies.nix} | 6 +-- system/services/sabnzbd-shows.nix | 53 +++++++++++++++++++ 3 files changed, 57 insertions(+), 5 deletions(-) rename system/services/{sabnzbd.nix => sabnzbd-movies.nix} (88%) create mode 100644 system/services/sabnzbd-shows.nix diff --git a/system/servenix/default.nix b/system/servenix/default.nix index 85005378..962f22d9 100644 --- a/system/servenix/default.nix +++ b/system/servenix/default.nix @@ -36,7 +36,8 @@ ../services/paperless.nix ../services/portainer-agent.nix ../services/radarr.nix - ../services/sabnzbd.nix + ../services/sabnzbd-movies.nix + ../services/sabnzbd-shows.nix ../services/sonarr.nix ../services/teamspeak.nix ../services/tinymediamanager.nix diff --git a/system/services/sabnzbd.nix b/system/services/sabnzbd-movies.nix similarity index 88% rename from system/services/sabnzbd.nix rename to system/services/sabnzbd-movies.nix index bbb7b294..36a91866 100644 --- a/system/services/sabnzbd.nix +++ b/system/services/sabnzbd-movies.nix @@ -7,7 +7,7 @@ sabnzbdVersion = "4.5.5"; in { virtualisation.oci-containers.containers = { - sabnzbd = { + sabnzbd-movies = { image = "linuxserver/sabnzbd:${sabnzbdVersion}"; autoStart = true; @@ -33,10 +33,8 @@ in { volumes = [ "/media/Movie/.sabnzbd:/media/movies/incomplete" "/media/Movie/0-MakeMKV:/media/movies" - "/media/Show/.sabnzbd:/media/shows/incomplete" - "/media/Show/0-MakeMKV:/media/shows" - "sabnzbd_config:/config" + "sabnzbd-movies_config:/config" ]; environment = { diff --git a/system/services/sabnzbd-shows.nix b/system/services/sabnzbd-shows.nix new file mode 100644 index 00000000..80c4fc35 --- /dev/null +++ b/system/services/sabnzbd-shows.nix @@ -0,0 +1,53 @@ +{ + config, + lib, + pkgs, + ... +}: let + sabnzbdVersion = "4.5.5"; +in { + virtualisation.oci-containers.containers = { + sabnzbd-shows = { + image = "linuxserver/sabnzbd:${sabnzbdVersion}"; + autoStart = true; + + login = { + # Uses DockerHub by default + # registry = ""; + + # DockerHub Credentials + username = "christoph.urlacher@protonmail.com"; + passwordFile = "${config.sops.secrets.docker-password.path}"; + }; + + dependsOn = []; + + ports = [ + # NOTE: On initial start, the gui won't be reachable via reverse proxy, + # because the hostname has to be whitelisted. + # Edit the "sabnzbd.ini" in the docker volume and add the reverse-proxy address + # to the host_whitelist variable. + # "8080:8080" + ]; + + volumes = [ + "/media/Show/.sabnzbd:/media/shows/incomplete" + "/media/Show/0-MakeMKV:/media/shows" + + "sabnzbd-shows_config:/config" + ]; + + environment = { + PUID = "3000"; + PGID = "3000"; + TZ = "Europe/Berlin"; + }; + + extraOptions = [ + # "--privileged" + # "--device=nvidia.com/gpu=all" + "--net=behind-nginx" + ]; + }; + }; +}