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 '';