From e6fef422e8b860862215c9fce524b46f2bac3f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 2 Aug 2024 16:18:07 +0300 Subject: [PATCH] photoprism: move userdata to /run/photoprism/userdata --- modules/services/photoprism/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/services/photoprism/default.nix b/modules/services/photoprism/default.nix index 48faa65..a059207 100644 --- a/modules/services/photoprism/default.nix +++ b/modules/services/photoprism/default.nix @@ -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 = { - ProtectHome = lib.mkForce "tmpfs"; - BindPaths = lib.mapAttrsToList (name: srcpath: "${srcpath}:/data/${name}") cfg.paths; + systemd = { + tmpfiles.rules = [ "d /run/photoprism/userdata 0700 photoprism photoprism -" ]; + services.photoprism.serviceConfig = { + ProtectHome = lib.mkForce "tmpfs"; + BindPaths = lib.mapAttrsToList ( + name: srcpath: "${srcpath}:/run/photoprism/userdata/${name}" + ) cfg.paths; + }; }; users = {