photoprism: move userdata to /run/photoprism/userdata

This commit is contained in:
Motiejus Jakštys 2024-08-02 16:18:07 +03:00
parent bd357d041a
commit e6fef422e8

View File

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