somewhat declaratively install vuetorrent

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

View File

@ -10,7 +10,12 @@ let
system = "x86_64-linux";
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:
builtins.attrValues {
inherit (ps)
@ -41,9 +46,15 @@ in
};
};
config = lib.mkIf config.my.servers.qbittorrent.enable {
home-manager.users.jawz.xdg.configFile."unpackerr.conf" =
lib.mkIf config.my.servers.unpackerr.enable
{ source = ../../dotfiles/unpackerr.conf; };
home-manager.users.jawz = {
home.activation.installVueTorrent = lib.mkAfter ''
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 =
let
mkQbitSecret = file: mode: {
@ -80,7 +91,7 @@ in
{
Restart = "on-failure";
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 {