forked from DGNum/infrastructure
32 lines
1.4 KiB
Diff
32 lines
1.4 KiB
Diff
|
From d7e721f614aef3e6bd7f4dfb6c1526e00d257fad Mon Sep 17 00:00:00 2001
|
||
|
From: Raito Bezarius <masterancpp@gmail.com>
|
||
|
Date: Sun, 2 Jul 2023 17:03:53 +0200
|
||
|
Subject: [PATCH] plausible: fix admin user password seed and SMTP passwords
|
||
|
|
||
|
LoadCredential was misused as it is not building any environment variable,
|
||
|
it is the responsibility of our preStart to do it so
|
||
|
Plausible's script can pick it up.
|
||
|
---
|
||
|
nixos/modules/services/web-apps/plausible.nix | 7 +++++--
|
||
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/nixos/modules/services/web-apps/plausible.nix b/nixos/modules/services/web-apps/plausible.nix
|
||
|
index 893dfa10acbc0..911daa53e6587 100644
|
||
|
--- a/nixos/modules/services/web-apps/plausible.nix
|
||
|
+++ b/nixos/modules/services/web-apps/plausible.nix
|
||
|
@@ -238,9 +238,12 @@ in {
|
||
|
path = [ cfg.package ]
|
||
|
++ optional cfg.database.postgres.setup config.services.postgresql.package;
|
||
|
script = ''
|
||
|
- export CONFIG_DIR=$CREDENTIALS_DIRECTORY
|
||
|
-
|
||
|
export RELEASE_COOKIE="$(< $CREDENTIALS_DIRECTORY/RELEASE_COOKIE )"
|
||
|
+ export ADMIN_USER_PWD="$(< $CREDENTIALS_DIRECTORY/ADMIN_USER_PWD )"
|
||
|
+ export SECRET_KEY_BASE="$(< $CREDENTIALS_DIRECTORY/SECRET_KEY_BASE )"
|
||
|
+
|
||
|
+ ${lib.optionalString (cfg.mail.smtp.passwordFile != null)
|
||
|
+ ''export SMTP_USER_PWD="$(< $CREDENTIALS_DIRECTORY/SMTP_USER_PWD )"''}
|
||
|
|
||
|
# setup
|
||
|
${cfg.package}/createdb.sh
|