diff --git a/configuration.nix b/configuration.nix index 66668e0..af17d53 100644 --- a/configuration.nix +++ b/configuration.nix @@ -24,11 +24,11 @@ ./services/feishin.nix ./services/ntfy.nix ./services/nextcloud.nix + ./services/unpackerr.nix inputs.lastfm-status.nixosModules.default inputs.confess.nixosModules.default inputs.common-modules.nixosModules.nixos-upgrade inputs.common-modules.nixosModules.qbittorrent-nox - inputs.common-modules.nixosModules.unpackerr inputs.common-modules.nixosModules.cross-seed ]; @@ -269,53 +269,7 @@ enable = true; port = 4014; }; - unpackerr = { - enable = true; - # Stores UN_SONARR_0_API_KEY, UN_RADARR_0_API_KEY - environmentFile = "/etc/secrets/unpackerr.env"; - user = "owo"; - group = "users"; - - settings = { - debug = false; - quiet = false; - - # How often to poll sonarr and radarr. - # Recommend 1m-5m. Uses Go Duration. - interval = "2m"; - - start_delay = "1m"; - retry_delay = "5m"; - - parallel = 1; - - # Use these configurations to control the file modes used for newly extracted - # files and folders. Recommend 0644/0755 or 0666/0777. - file_mode = "0644"; - dir_mode = "0755"; - - sonarr = [ - { - url = "http://localhost:8989"; - paths = [ "/mnt/drive1/torrents/downloads" "/mnt/drive2/torrents" "/mnt/seagate-8tb-1/torrents" "/mnt/seagate-8tb-2/torrents" ]; - protocols = "torrent"; - timeout = "100s"; - delete_delay = "10m"; - } - ]; - - radarr = [ - { - url = "http://localhost:7878"; - paths = [ "/mnt/drive1/torrents/downloads" "/mnt/drive2/torrents" "/mnt/seagate-8tb-1/torrents" "/mnt/seagate-8tb-2/torrents" ]; - protocols = "torrent"; - timeout = "100s"; - delete_delay = "10m"; - } - ]; - }; - }; qbittorrent-nox = { enable = true; openFirewall = true; diff --git a/services/unpackerr.nix b/services/unpackerr.nix new file mode 100644 index 0000000..6afb741 --- /dev/null +++ b/services/unpackerr.nix @@ -0,0 +1,53 @@ +{ inputs, ... }: { + imports = [ + inputs.common-modules.nixosModules.unpackerr + ]; + + services.unpackerr = { + enable = true; + + # Stores UN_SONARR_0_API_KEY, UN_RADARR_0_API_KEY + environmentFile = "/etc/secrets/unpackerr.env"; + user = "owo"; + group = "users"; + + settings = { + debug = false; + quiet = false; + + # How often to poll sonarr and radarr. + # Recommend 1m-5m. Uses Go Duration. + interval = "2m"; + + start_delay = "1m"; + retry_delay = "5m"; + + parallel = 1; + + # Use these configurations to control the file modes used for newly extracted + # files and folders. Recommend 0644/0755 or 0666/0777. + file_mode = "0644"; + dir_mode = "0755"; + + sonarr = [ + { + url = "http://localhost:8989"; + paths = [ "/mnt/drive1/torrents/downloads" "/mnt/drive2/torrents" "/mnt/seagate-8tb-1/torrents" "/mnt/seagate-8tb-2/torrents" ]; + protocols = "torrent"; + timeout = "100s"; + delete_delay = "10m"; + } + ]; + + radarr = [ + { + url = "http://localhost:7878"; + paths = [ "/mnt/drive1/torrents/downloads" "/mnt/drive2/torrents" "/mnt/seagate-8tb-1/torrents" "/mnt/seagate-8tb-2/torrents" ]; + protocols = "torrent"; + timeout = "100s"; + delete_delay = "10m"; + } + ]; + }; + }; +}