From 24064af4bdc18dc5f2b8c7aef221cab2687b4626 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Mon, 31 Jul 2023 15:45:35 -0600 Subject: [PATCH] box: enable readarr and rtorrent --- flake.lock | 8 ++++---- hosts/box/default.nix | 25 ++++++++++++++++++++++++- hosts/faf/default.nix | 1 + 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 16a805b..847c15d 100644 --- a/flake.lock +++ b/flake.lock @@ -437,11 +437,11 @@ "stable": "stable_2" }, "locked": { - "lastModified": 1690469873, - "narHash": "sha256-ohAEIlsdUeOiIxsmN8GU6M5Ui0p1kChkxWQ+dYQGNTk=", + "lastModified": 1690836207, + "narHash": "sha256-GirSUj6lEt70t6mZQAVI3UHyu9fkjwNSgUfXoGIUFU0=", "ref": "main", - "rev": "aa792f779df5b2227b6087c8a04cc88dec0f506a", - "revCount": 101, + "rev": "af2e01fe2f0933fa05ce7f4ac21107ed86b45596", + "revCount": 102, "type": "git", "url": "ssh://xin-secrets-ro/qbit/xin-secrets.git" }, diff --git a/hosts/box/default.nix b/hosts/box/default.nix index f89c94d..1d0f4e7 100644 --- a/hosts/box/default.nix +++ b/hosts/box/default.nix @@ -88,6 +88,8 @@ in { sops.secrets.bw_key = mkNginxSecret; sops.secrets.invidious_cert = mkNginxSecret; sops.secrets.invidious_key = mkNginxSecret; + sops.secrets.readarr_cert = mkNginxSecret; + sops.secrets.readarr_key = mkNginxSecret; boot.supportedFilesystems = ["zfs"]; boot.loader.grub.copyKernels = true; @@ -172,7 +174,7 @@ in { users.groups.media = { name = "media"; - members = ["qbit" "sonarr" "radarr" "lidarr" "nzbget" "jellyfin" "headphones"]; + members = ["qbit" "sonarr" "radarr" "lidarr" "nzbget" "jellyfin" "headphones" "rtorrent" "readarr"]; }; users.groups.photos = { @@ -277,6 +279,14 @@ in { tor.enable = true; + rtorrent = { + enable = true; + downloadDir = "/media/downloads/rtorrent"; + }; + readarr = { + enable = true; + dataDir = "/media/books"; + }; sonarr.enable = true; radarr.enable = true; lidarr.enable = true; @@ -769,6 +779,19 @@ in { ''; }; }; + "readarr.bold.daemon" = { + sslCertificateKey = "${config.sops.secrets.readarr_key.path}"; + sslCertificate = "${config.sops.secrets.readarr_cert.path}"; + forceSSL = true; + locations."/" = { + proxyPass = "http://localhost:8787"; + proxyWebsockets = true; + extraConfig = '' + ${httpAllow} + deny all; + ''; + }; + }; "graph.bold.daemon" = { sslCertificateKey = "${config.sops.secrets.graph_key.path}"; diff --git a/hosts/faf/default.nix b/hosts/faf/default.nix index 4cad07e..c1ff158 100644 --- a/hosts/faf/default.nix +++ b/hosts/faf/default.nix @@ -115,6 +115,7 @@ in { ''"radarr.bold.daemon. IN A 100.120.151.126"'' ''"reddit.bold.daemon. IN A 100.120.151.126"'' ''"sonarr.bold.daemon. IN A 100.120.151.126"'' + ''"readarr.bold.daemon. IN A 100.120.151.126"'' ''"graph.bold.daemon. IN A 100.120.151.126"'' ''"invidious.bold.daemon. IN A 100.120.151.126"'' ''"router.bold.daemon. IN A 10.6.0.1"''