Loading nixos/modules/services/web-apps/photoprism.nix +20 −3 Original line number Diff line number Diff line Loading @@ -40,6 +40,14 @@ in ''; }; databasePasswordFile = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; description = '' Database password file. ''; }; address = lib.mkOption { type = lib.types.str; default = "localhost"; Loading Loading @@ -114,9 +122,12 @@ in cfg.storagePath ]; LoadCredential = lib.optionalString ( cfg.passwordFile != null ) "PHOTOPRISM_ADMIN_PASSWORD_FILE:${cfg.passwordFile}"; LoadCredential = [ (lib.optionalString (cfg.passwordFile != null) "PHOTOPRISM_ADMIN_PASSWORD_FILE=${cfg.passwordFile}") (lib.optionalString ( cfg.databasePasswordFile != null ) "PHOTOPRISM_DATABASE_PASSWORD=${cfg.databasePasswordFile}") ]; LockPersonality = true; PrivateDevices = true; Loading Loading @@ -151,6 +162,9 @@ in ${lib.optionalString (cfg.passwordFile != null) '' export PHOTOPRISM_ADMIN_PASSWORD_FILE=$CREDENTIALS_DIRECTORY/PHOTOPRISM_ADMIN_PASSWORD_FILE ''} ${lib.optionalString (cfg.databasePasswordFile != null) '' export PHOTOPRISM_DATABASE_PASSWORD=$(cat "$CREDENTIALS_DIRECTORY/PHOTOPRISM_DATABASE_PASSWORD") ''} exec ${cfg.package}/bin/photoprism migrations run -f ''; Loading @@ -158,6 +172,9 @@ in ${lib.optionalString (cfg.passwordFile != null) '' export PHOTOPRISM_ADMIN_PASSWORD_FILE=$CREDENTIALS_DIRECTORY/PHOTOPRISM_ADMIN_PASSWORD_FILE ''} ${lib.optionalString (cfg.databasePasswordFile != null) '' export PHOTOPRISM_DATABASE_PASSWORD=$(cat "$CREDENTIALS_DIRECTORY/PHOTOPRISM_DATABASE_PASSWORD") ''} exec ${cfg.package}/bin/photoprism start ''; }; Loading Loading
nixos/modules/services/web-apps/photoprism.nix +20 −3 Original line number Diff line number Diff line Loading @@ -40,6 +40,14 @@ in ''; }; databasePasswordFile = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; description = '' Database password file. ''; }; address = lib.mkOption { type = lib.types.str; default = "localhost"; Loading Loading @@ -114,9 +122,12 @@ in cfg.storagePath ]; LoadCredential = lib.optionalString ( cfg.passwordFile != null ) "PHOTOPRISM_ADMIN_PASSWORD_FILE:${cfg.passwordFile}"; LoadCredential = [ (lib.optionalString (cfg.passwordFile != null) "PHOTOPRISM_ADMIN_PASSWORD_FILE=${cfg.passwordFile}") (lib.optionalString ( cfg.databasePasswordFile != null ) "PHOTOPRISM_DATABASE_PASSWORD=${cfg.databasePasswordFile}") ]; LockPersonality = true; PrivateDevices = true; Loading Loading @@ -151,6 +162,9 @@ in ${lib.optionalString (cfg.passwordFile != null) '' export PHOTOPRISM_ADMIN_PASSWORD_FILE=$CREDENTIALS_DIRECTORY/PHOTOPRISM_ADMIN_PASSWORD_FILE ''} ${lib.optionalString (cfg.databasePasswordFile != null) '' export PHOTOPRISM_DATABASE_PASSWORD=$(cat "$CREDENTIALS_DIRECTORY/PHOTOPRISM_DATABASE_PASSWORD") ''} exec ${cfg.package}/bin/photoprism migrations run -f ''; Loading @@ -158,6 +172,9 @@ in ${lib.optionalString (cfg.passwordFile != null) '' export PHOTOPRISM_ADMIN_PASSWORD_FILE=$CREDENTIALS_DIRECTORY/PHOTOPRISM_ADMIN_PASSWORD_FILE ''} ${lib.optionalString (cfg.databasePasswordFile != null) '' export PHOTOPRISM_DATABASE_PASSWORD=$(cat "$CREDENTIALS_DIRECTORY/PHOTOPRISM_DATABASE_PASSWORD") ''} exec ${cfg.package}/bin/photoprism start ''; }; Loading