From dff238e9737408f5be0ee1540bd1f2de7ecc372c Mon Sep 17 00:00:00 2001 From: Skyler Grey Date: Tue, 4 Nov 2025 19:53:04 +0000 Subject: [PATCH] fix(kavita): move libraries to /var/lib/libraries Change-Id: nsolnmpkxuounnwwsomqrzoyrslrktok Previously we had our libraries in a subdirectory of /var/lib/copyparty While that's an OK idea in theory, in practice it'd require us to make every directory on the way to /var/lib/copyparty/data/groups/library +rx to kavita. That's something we're unwilling to do. The true fix is to move this out so we don't have to meddle with permissions except those which are directly on this directory --- packetmix/systems/teal/copyparty.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packetmix/systems/teal/copyparty.nix b/packetmix/systems/teal/copyparty.nix index 51b3551f..825d230d 100644 --- a/packetmix/systems/teal/copyparty.nix +++ b/packetmix/systems/teal/copyparty.nix @@ -115,7 +115,7 @@ }; }; "/groups/library" = { - path = "/var/lib/copyparty/data/groups/library"; + path = "/var/lib/libraries"; access = { A = [ @@ -140,6 +140,7 @@ builtins.attrValues (map (mount: mount.path)) (map (lib.removePrefix "/var/lib/")) + (builtins.filter (name: !(builtins.elem name [ "libraries" ]))) # For shared directories we can't afford for systemd to change permissions on us... (lib.concatStringsSep " ") ]); }; @@ -293,6 +294,15 @@ clicks.storage.impermanence.persist.directories = [ "/var/lib/copyparty" + { + directory = "/var/lib/libraries"; + mode = "0770"; + group = "copyparty+kavita"; + defaultPerms = { + mode = "0770"; + group = "copyparty+kavita"; + }; + } ]; }; } -- 2.43.0