mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
service/photoprism: apply suggestions
This commit is contained in:
parent
f15ce14543
commit
2cd74954e7
1 changed files with 7 additions and 2 deletions
|
@ -85,7 +85,7 @@ in
|
||||||
type = lib.types.attrsOf lib.types.str;
|
type = lib.types.attrsOf lib.types.str;
|
||||||
default = { };
|
default = { };
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Extra photoprism config options. See [the getting-stated guide](https://docs.photoprism.app/getting-started/config-options/) for available options.
|
Extra photoprism config options. See [the getting-started guide](https://docs.photoprism.app/getting-started/config-options/) for available options.
|
||||||
'';
|
'';
|
||||||
example = {
|
example = {
|
||||||
PHOTOPRISM_DEFAULT_LOCALE = "de";
|
PHOTOPRISM_DEFAULT_LOCALE = "de";
|
||||||
|
@ -134,7 +134,13 @@ in
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
environment = env;
|
environment = env;
|
||||||
|
|
||||||
|
# wait for easier password configuration: https://github.com/photoprism/photoprism/pull/2302
|
||||||
preStart = ''
|
preStart = ''
|
||||||
|
${lib.optionalString (cfg.passwordFile != null) ''
|
||||||
|
export PHOTOPRISM_ADMIN_PASSWORD=$(cat "$CREDENTIALS_DIRECTORY/PHOTOPRISM_ADMIN_PASSWORD")
|
||||||
|
''}
|
||||||
|
exec ${cfg.package}/bin/photoprism migrations run -f
|
||||||
|
|
||||||
ln -sf ${manage} photoprism-manage
|
ln -sf ${manage} photoprism-manage
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -143,7 +149,6 @@ in
|
||||||
${lib.optionalString (cfg.passwordFile != null) ''
|
${lib.optionalString (cfg.passwordFile != null) ''
|
||||||
export PHOTOPRISM_ADMIN_PASSWORD=$(cat "$CREDENTIALS_DIRECTORY/PHOTOPRISM_ADMIN_PASSWORD")
|
export PHOTOPRISM_ADMIN_PASSWORD=$(cat "$CREDENTIALS_DIRECTORY/PHOTOPRISM_ADMIN_PASSWORD")
|
||||||
''}
|
''}
|
||||||
${cfg.package}/bin/photoprism migrations run -f
|
|
||||||
exec ${cfg.package}/bin/photoprism start
|
exec ${cfg.package}/bin/photoprism start
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue