From ae312d307f8fb90d03525e7bd24e6a5af1e8a757 Mon Sep 17 00:00:00 2001 From: batteredbunny Date: Wed, 19 Mar 2025 23:47:10 +0200 Subject: [PATCH] feat: Update qbittorrent module --- flake.lock | 14 +++++++------- services/cross-seed.nix | 6 +++--- services/qbittorrent.nix | 8 ++++---- setup-drive.sh | 4 ++++ 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/flake.lock b/flake.lock index e2a7eeb..2fcfa6e 100644 --- a/flake.lock +++ b/flake.lock @@ -60,11 +60,11 @@ ] }, "locked": { - "lastModified": 1742170255, - "narHash": "sha256-vleqYAfPdZWwoKIrzAb7ZFOhTH7DF9r7DoBPbzh+u30=", + "lastModified": 1742423846, + "narHash": "sha256-YyfKEZQUsuBlCAvdUxGMZB7t5+LDcDesApxnE0ajsB4=", "ref": "refs/heads/main", - "rev": "9c9efe8a10ee222f60ded26f253a4dd3f62a426c", - "revCount": 139, + "rev": "3d3f6053dd0e2a100d38786c2edf8c7b8cc4320d", + "revCount": 140, "type": "git", "url": "https://forge.catnip.ee/batteredbunny/common.nix" }, @@ -332,11 +332,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1742069588, - "narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=", + "lastModified": 1742288794, + "narHash": "sha256-Txwa5uO+qpQXrNG4eumPSD+hHzzYi/CdaM80M9XRLCo=", "owner": "Nixos", "repo": "nixpkgs", - "rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5", + "rev": "b6eaf97c6960d97350c584de1b6dcff03c9daf42", "type": "github" }, "original": { diff --git a/services/cross-seed.nix b/services/cross-seed.nix index 0b41392..6f6c9c7 100644 --- a/services/cross-seed.nix +++ b/services/cross-seed.nix @@ -1,4 +1,4 @@ -{ ... }: +{ config, ... }: { services.cross-seed = { enable = true; @@ -6,7 +6,7 @@ settingsFile = "/etc/secrets/cross-seed.json"; settings = { - torrentDir = "/home/owo/.local/share/qBittorrent/BT_backup"; + torrentDir = "/var/lib/qBittorrent/qBittorrent/data/BT_backup"; action = "inject"; duplicateCategories = true; searchTimeout = "2 minutes"; @@ -15,6 +15,6 @@ }; users.users."cross-seed".extraGroups = [ - "users" # qbittorrent runs under users becuase i have not migrated it + config.services.qbittorrent-nox.group ]; } diff --git a/services/qbittorrent.nix b/services/qbittorrent.nix index af2a50a..108f86e 100644 --- a/services/qbittorrent.nix +++ b/services/qbittorrent.nix @@ -7,10 +7,11 @@ qbittorrent-nox = { enable = true; openFirewall = true; - user = "owo"; - group = "users"; webuiPort = 4010; torrentingPort = 43125; + extraArgs = [ + "--confirm-legal-notice" + ]; }; caddy.virtualHosts."http://qbittorrent.internal".extraConfig = '' @@ -19,8 +20,7 @@ ''; borgbackup.jobs."borgbase".paths = [ - "/home/owo/.config/qBittorrent" - "/home/owo/.local/share/qBittorrent" + config.services.qbittorrent-nox.profileDir ]; }; } diff --git a/setup-drive.sh b/setup-drive.sh index 5f4a1e3..916720c 100755 --- a/setup-drive.sh +++ b/setup-drive.sh @@ -50,11 +50,15 @@ sudo setfacl -m u:lidarr:rx $DRIVE/media sudo setfacl -m u:lidarr:rwx $DRIVE/media/music sudo setfacl -m u:lidarr:rwx -R $DRIVE/media/music +# Qbittorrent +sudo setfacl -m u:qbittorrent:rx $DRIVE + echo Creating $DRIVE/torrents mkdir -p $DRIVE/torrents sudo setfacl -m u:radarr:rx $DRIVE/torrents sudo setfacl -m u:sonarr:rx $DRIVE/torrents sudo setfacl -m u:lidarr:rx $DRIVE/torrents +sudo setfacl -m u:qbittorrent:rwx $DRIVE/torrents # Readers sudo setfacl -m u:caddy:rx $DRIVE