diff options
author | Raito Bezarius <masterancpp@gmail.com> | 2023-07-02 17:03:53 +0200 |
---|---|---|
committer | Raito Bezarius <masterancpp@gmail.com> | 2023-07-02 17:03:53 +0200 |
commit | d7e721f614aef3e6bd7f4dfb6c1526e00d257fad (patch) | |
tree | fbcaad450a8dda7d20c511cedae66a7d8c199b57 /nixos/modules | |
parent | 3cf540aa1482ff74d89d46063b6f33a2050bbf04 (diff) | |
download | nixpkgs-d7e721f614aef3e6bd7f4dfb6c1526e00d257fad.tar nixpkgs-d7e721f614aef3e6bd7f4dfb6c1526e00d257fad.tar.gz nixpkgs-d7e721f614aef3e6bd7f4dfb6c1526e00d257fad.tar.bz2 nixpkgs-d7e721f614aef3e6bd7f4dfb6c1526e00d257fad.tar.lz nixpkgs-d7e721f614aef3e6bd7f4dfb6c1526e00d257fad.tar.xz nixpkgs-d7e721f614aef3e6bd7f4dfb6c1526e00d257fad.tar.zst nixpkgs-d7e721f614aef3e6bd7f4dfb6c1526e00d257fad.zip |
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.
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/web-apps/plausible.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/modules/services/web-apps/plausible.nix b/nixos/modules/services/web-apps/plausible.nix index 893dfa10acb..911daa53e65 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 |