qbit_manage fix

This commit is contained in:
Danilo Reyes
2026-03-22 23:12:50 -06:00
parent 23f2c7d564
commit 98777a1935

View File

@@ -52,6 +52,18 @@ in
config = lib.mkIf (config.my.servers.qbittorrent.enable && config.my.secureHost) {
my.network.firewall.additionalPorts = [ config.my.servers.qbittorrent.port ];
home-manager.users.jawz.xdg.dataFile.vuetorrent.source = vuetorrent;
home-manager.users.jawz.imports = [
({ lib, ... }: {
home.activation.qbittorrentAutorunCommand = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
conf=/home/jawz/.config/qBittorrent/qBittorrent.conf
if [ -f "$conf" ]; then
sed -i \
's|^program=.*$|program=${torrentCompletionScript} %F|' \
"$conf"
fi
'';
})
];
sops.secrets =
let
mkQbitSecret = file: mode: {
@@ -89,8 +101,8 @@ in
description = "Tidy up my torrents";
wantedBy = [ "default.target" ];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
Type = "oneshot";
TimeoutStartSec = "5min";
ExecStart = "${qbit_manageEnv}/bin/python ${qbit_manage}/qbit_manage.py -r -c /home/jawz/.config/qbit_manage/config.yml";
};
};