photoprism: move userdata mounts to /var/lib

This commit is contained in:
Motiejus Jakštys 2024-08-02 16:42:17 +03:00
parent abdf9d20e1
commit fb349648ae
1 changed files with 4 additions and 3 deletions

View File

@ -13,16 +13,17 @@ in
config = lib.mkIf cfg.enable {
services.photoprism = {
enable = true;
originalsPath = "/run/photoprism/userdata";
originalsPath = "/var/cache/photoprism/userdata";
passwordFile = cfg.passwordFile;
};
systemd = {
tmpfiles.rules = [ "d /run/photoprism/userdata 0700 photoprism photoprism -" ];
tmpfiles.rules = [ "d /var/cache/photoprism/userdata 0700 photoprism photoprism -" ];
services.photoprism.serviceConfig = {
ProtectHome = lib.mkForce "tmpfs";
CacheDirectory = "photoprism";
BindPaths = lib.mapAttrsToList (
name: srcpath: "${srcpath}:/run/photoprism/userdata/${name}"
name: srcpath: "${srcpath}:/var/cache/photoprism/userdata/${name}"
) cfg.paths;
};
};