From 53f95e2ea8b582ac3d4aca699baae9b45fb3dadf Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 20 Apr 2025 12:16:29 +0200 Subject: [PATCH] nixos/photoprism: use PHOTOPRISM_ADMIN_PASSWORD_FILE --- nixos/modules/services/web-apps/photoprism.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/web-apps/photoprism.nix b/nixos/modules/services/web-apps/photoprism.nix index cb10d64bed7e..0b0cd3383fcd 100644 --- a/nixos/modules/services/web-apps/photoprism.nix +++ b/nixos/modules/services/web-apps/photoprism.nix @@ -116,7 +116,7 @@ in LoadCredential = lib.optionalString ( cfg.passwordFile != null - ) "PHOTOPRISM_ADMIN_PASSWORD:${cfg.passwordFile}"; + ) "PHOTOPRISM_ADMIN_PASSWORD_FILE:${cfg.passwordFile}"; LockPersonality = true; PrivateDevices = true; @@ -146,19 +146,17 @@ in wantedBy = [ "multi-user.target" ]; environment = env; - # reminder: easier password configuration will come in https://github.com/photoprism/photoprism/pull/2302 preStart = '' ln -sf ${manage} photoprism-manage - ${lib.optionalString (cfg.passwordFile != null) '' - export PHOTOPRISM_ADMIN_PASSWORD=$(cat "$CREDENTIALS_DIRECTORY/PHOTOPRISM_ADMIN_PASSWORD") + export PHOTOPRISM_ADMIN_PASSWORD_FILE=$CREDENTIALS_DIRECTORY/PHOTOPRISM_ADMIN_PASSWORD_FILE ''} exec ${cfg.package}/bin/photoprism migrations run -f ''; script = '' ${lib.optionalString (cfg.passwordFile != null) '' - export PHOTOPRISM_ADMIN_PASSWORD=$(cat "$CREDENTIALS_DIRECTORY/PHOTOPRISM_ADMIN_PASSWORD") + export PHOTOPRISM_ADMIN_PASSWORD_FILE=$CREDENTIALS_DIRECTORY/PHOTOPRISM_ADMIN_PASSWORD_FILE ''} exec ${cfg.package}/bin/photoprism start '';