diff --git a/fili/services/media/autobrr.nix b/fili/services/media/autobrr.nix new file mode 100644 index 0000000..9326bfb --- /dev/null +++ b/fili/services/media/autobrr.nix @@ -0,0 +1,35 @@ +{ config, secrets, ... }: +{ + sops.secrets.autobrr = { + sopsFile = "${secrets}/autobrr.yaml"; + key = "key"; + format = "yaml"; + }; + + services.nginx = { + virtualHosts."autobrr.donsz.nl" = { + forceSSL = true; + http2 = true; + enableACME = true; + + locations."/" = { + proxyPass = "http://${config.services.autobrr.settings.host}:${toString config.services.autobrr.settings.port}"; + }; + }; + }; + + services.oauth2-proxy.nginx.virtualHosts."autobrr.donsz.nl" = { + allowed_groups = [ "torrent" ]; + }; + + services.autobrr = { + enable = true; + settings = { + logLevel = "DEBUG"; + checkForUpdates = false; + host = "[::1]"; + port = 11012; + }; + secretFile = config.sops.secrets.autobrr.path; + }; +} diff --git a/fili/services/media/default.nix b/fili/services/media/default.nix index 35620cb..ceeb1d3 100644 --- a/fili/services/media/default.nix +++ b/fili/services/media/default.nix @@ -6,5 +6,6 @@ _: { ./torrent.nix ./jackett.nix ./jellyfin.nix + ./autobrr.nix ]; } diff --git a/fili/services/media/torrent.nix b/fili/services/media/torrent.nix index 8286aae..4f7b192 100644 --- a/fili/services/media/torrent.nix +++ b/fili/services/media/torrent.nix @@ -107,7 +107,7 @@ settings = { download-dir = "/storage/storage/torrents"; incomplete-dir-enabled = false; - # incomplete-dir = "/storage/storage/torrents"; + incomplete-dir = "/storage/storage/torrents"; rpc-bind-address = "192.168.15.1"; rpc-host-whitelist-enabled = false; diff --git a/flake.lock b/flake.lock index 10ec36e..a621f5b 100644 --- a/flake.lock +++ b/flake.lock @@ -444,11 +444,11 @@ }, "nixpkgs_11": { "locked": { - "lastModified": 1767439050, - "narHash": "sha256-UHXvixX4PjyzuTtyEU0GAe4W7sIVFBBntCNPHkZTRrA=", + "lastModified": 1767653099, + "narHash": "sha256-1lZvN3Lg7NjuXVHXdKgKSnVPnOH6KugGFTTGKLKLu/4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7fe910442588191a2a22848196daebc9f7cc48b7", + "rev": "6f34e6c7a48c7aac4a26a388430f8a9f480a6d0e", "type": "github" }, "original": { @@ -696,11 +696,11 @@ "nixpkgs": "nixpkgs_11" }, "locked": { - "lastModified": 1767440370, - "narHash": "sha256-3jSo/IeyV2/ZsSx2+w/VAFVbIaNudXTALTUR2z6rbwo=", + "lastModified": 1767655057, + "narHash": "sha256-gvDWxuDucrGsBxDF0iZeFcTqVbADMcWwK2nne6LKlLs=", "ref": "refs/heads/main", - "rev": "0484a0ef06c4be3c647efc3ee0071349494bec49", - "revCount": 5, + "rev": "ea9c28258665f76042781a2b7b84ddf6d99a6e62", + "revCount": 6, "type": "git", "url": "ssh://forgejo@git.donsz.nl/jana/server-secrets.git" },