photoprism: move userdata mounts to /var/lib
This commit is contained in:
parent
abdf9d20e1
commit
fb349648ae
@ -13,16 +13,17 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.photoprism = {
|
services.photoprism = {
|
||||||
enable = true;
|
enable = true;
|
||||||
originalsPath = "/run/photoprism/userdata";
|
originalsPath = "/var/cache/photoprism/userdata";
|
||||||
passwordFile = cfg.passwordFile;
|
passwordFile = cfg.passwordFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
tmpfiles.rules = [ "d /run/photoprism/userdata 0700 photoprism photoprism -" ];
|
tmpfiles.rules = [ "d /var/cache/photoprism/userdata 0700 photoprism photoprism -" ];
|
||||||
services.photoprism.serviceConfig = {
|
services.photoprism.serviceConfig = {
|
||||||
ProtectHome = lib.mkForce "tmpfs";
|
ProtectHome = lib.mkForce "tmpfs";
|
||||||
|
CacheDirectory = "photoprism";
|
||||||
BindPaths = lib.mapAttrsToList (
|
BindPaths = lib.mapAttrsToList (
|
||||||
name: srcpath: "${srcpath}:/run/photoprism/userdata/${name}"
|
name: srcpath: "${srcpath}:/var/cache/photoprism/userdata/${name}"
|
||||||
) cfg.paths;
|
) cfg.paths;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user