somewhat declaratively install vuetorrent

This commit is contained in:
2025-05-31 17:32:04 -06:00
parent f67f550867
commit d466d4091a

View File

@@ -10,7 +10,12 @@ let
system = "x86_64-linux"; system = "x86_64-linux";
config.allowUnfree = true; config.allowUnfree = true;
}; };
qbit_manage_env = pkgs.python3.withPackages ( vuetorrent = pkgs.fetchzip {
url = "https://github.com/VueTorrent/VueTorrent/releases/download/v2.25.0/vuetorrent.zip";
sha256 = "sha256-sOaQNw6AnpwNFEextgTnsjEOfpl3/lpoOZFgFOz7Bos=";
stripRoot = true;
};
qbit_manageEnv = pkgs.python3.withPackages (
ps: ps:
builtins.attrValues { builtins.attrValues {
inherit (ps) inherit (ps)
@@ -41,9 +46,15 @@ in
}; };
}; };
config = lib.mkIf config.my.servers.qbittorrent.enable { config = lib.mkIf config.my.servers.qbittorrent.enable {
home-manager.users.jawz.xdg.configFile."unpackerr.conf" = home-manager.users.jawz = {
lib.mkIf config.my.servers.unpackerr.enable home.activation.installVueTorrent = lib.mkAfter ''
{ source = ../../dotfiles/unpackerr.conf; }; mkdir -p "$HOME/.config/vuetorrent"
cp -rT "${vuetorrent}" "$HOME/.local/share/vuetorrent"
'';
xdg.configFile."unpackerr.conf" = lib.mkIf config.my.servers.unpackerr.enable {
source = ../../dotfiles/unpackerr.conf;
};
};
sops.secrets = sops.secrets =
let let
mkQbitSecret = file: mode: { mkQbitSecret = file: mode: {
@@ -80,7 +91,7 @@ in
{ {
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 30; RestartSec = 30;
ExecStart = "${qbit_manage_env}/bin/python ${env}/qbit_manage.py -r -c ${env}/config.yml"; ExecStart = "${qbit_manageEnv}/bin/python ${env}/qbit_manage.py -r -c ${env}/config.yml";
}; };
}; };
unpackerr = lib.mkIf config.my.servers.unpackerr.enable { unpackerr = lib.mkIf config.my.servers.unpackerr.enable {