diff options
author | Linnnus <[email protected]> | 2024-10-01 15:06:20 +0200 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-10-01 15:06:20 +0200 |
commit | 98cd14bce3952bc8f777b40ea1ca557bf2fc8361 (patch) | |
tree | 6e280f9f4121d36121c01a7d1c9d88583de603a7 /hosts/ahmed | |
parent | da255cfe08fef9d3f0aa37049d1ce5e758f4cc5d (diff) |
qbittorent: Fix creation logic
After attempting to use this configuration on another device, it turns
out that the persistent data directories were being created with the
wrong permissions.
Diffstat (limited to 'hosts/ahmed')
-rw-r--r-- | hosts/ahmed/torrenting/save-path.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hosts/ahmed/torrenting/save-path.nix b/hosts/ahmed/torrenting/save-path.nix index d58babb..293c00f 100644 --- a/hosts/ahmed/torrenting/save-path.nix +++ b/hosts/ahmed/torrenting/save-path.nix @@ -45,10 +45,15 @@ in { categoriesJson = lib.genAttrs categories (c: {"save_path" = "${downloadPath}/${c}";}); categoriesFile = (pkgs.formats.json {}).generate "categories.json" categoriesJson; categoriesPath = "${config.services.qbittorrent.profile}/qBittorrent/config/categories.json"; - in - pkgs.writeShellScript "qbittorrent-create-categories.sh" '' + + script = pkgs.writeShellScript "qbittorrent-create-categories.sh" '' + # FIXME: Creation and chowning are duplicated between this and qBittorrent service definition. + mkdir -p /var/lib/qBittorrent/qBittorrent/config ln -s -f ${categoriesFile} ${categoriesPath} + chown --recursive qbittorrent:qbittorrent -- ${config.services.qbittorrent.profile}/qBittorrent/config/ ''; + in + "!${script}"; }; }; |