nixos/privacyidea-ldap-proxy: always run envsubst

Otherwise the file doesn't exist at the expected location.
This commit is contained in:
Maximilian Bosch 2022-07-16 14:00:46 +02:00
parent bccaac9535
commit 4adf26f018
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E

View file

@ -330,9 +330,8 @@ in
StateDirectory = "privacyidea-ldap-proxy";
EnvironmentFile = mkIf (cfg.ldap-proxy.environmentFile != null)
cfg.ldap-proxy.environmentFile;
ExecStartPre = mkIf (cfg.ldap-proxy.settings != {})
ExecStartPre =
"${pkgs.writeShellScript "substitute-secrets-ldap-proxy" ''
set -x
${pkgs.envsubst}/bin/envsubst \
-i ${ldapProxyConfig} \
-o $STATE_DIRECTORY/ldap-proxy.ini