From 4adf26f01893ed98f9ebbc55cbf87cb1be57a54a Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 16 Jul 2022 14:00:46 +0200 Subject: [PATCH] nixos/privacyidea-ldap-proxy: always run envsubst Otherwise the file doesn't exist at the expected location. --- nixos/modules/services/security/privacyidea.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/services/security/privacyidea.nix b/nixos/modules/services/security/privacyidea.nix index 190feaf657f3..d48266e4a759 100644 --- a/nixos/modules/services/security/privacyidea.nix +++ b/nixos/modules/services/security/privacyidea.nix @@ -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