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