fix(kavita): move libraries to /var/lib/libraries #107

merged
opened by a.starrysky.fyi targeting main from private/minion/push-wznllvxvuqmz

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

Changed files
+11 -1
packetmix
systems
+11 -1
packetmix/systems/teal/copyparty.nix
··· 115 }; 116 }; 117 "/groups/library" = { 118 - path = "/var/lib/copyparty/data/groups/library"; 119 120 access = { 121 A = [ ··· 140 builtins.attrValues 141 (map (mount: mount.path)) 142 (map (lib.removePrefix "/var/lib/")) 143 (lib.concatStringsSep " ") 144 ]); 145 }; ··· 293 294 clicks.storage.impermanence.persist.directories = [ 295 "/var/lib/copyparty" 296 ]; 297 }; 298 }
··· 115 }; 116 }; 117 "/groups/library" = { 118 + path = "/var/lib/libraries"; 119 120 access = { 121 A = [ ··· 140 builtins.attrValues 141 (map (mount: mount.path)) 142 (map (lib.removePrefix "/var/lib/")) 143 + (builtins.filter (name: !(builtins.elem name [ "libraries" ]))) # For shared directories we can't afford for systemd to change permissions on us... 144 (lib.concatStringsSep " ") 145 ]); 146 }; ··· 294 295 clicks.storage.impermanence.persist.directories = [ 296 "/var/lib/copyparty" 297 + { 298 + directory = "/var/lib/libraries"; 299 + mode = "0770"; 300 + group = "copyparty+kavita"; 301 + defaultPerms = { 302 + mode = "0770"; 303 + group = "copyparty+kavita"; 304 + }; 305 + } 306 ]; 307 }; 308 }