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
1 changed files with 9 additions and 4 deletions

View File

@ -13,13 +13,18 @@ in
config = lib.mkIf cfg.enable {
services.photoprism = {
enable = true;
originalsPath = "/data";
originalsPath = "/run/photoprism/userdata";
passwordFile = cfg.passwordFile;
};
systemd.services.photoprism.serviceConfig = {
systemd = {
tmpfiles.rules = [ "d /run/photoprism/userdata 0700 photoprism photoprism -" ];
services.photoprism.serviceConfig = {
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 = {