File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change 183183 script =
184184 let
185185 authCfg = config . sys . services . matrix-synapse . authDelegation ;
186- masArgs = lib . optionalString authCfg . enable ''
187- --rawfile client_secret ${ config . sops . secrets . "matrix-authentication-service/client_secret" . path } \
188- --rawfile admin_token ${ config . sops . secrets . "matrix-authentication-service/synapse_secret" . path } \
189- --arg issuer "${ authCfg . issuer } " \
190- --arg client_id "${ authCfg . clientId } " \
191- --arg client_auth_method "${ authCfg . clientAuthMethod } " \
192- ${ lib . optionalString (
193- authCfg . accountManagementUrl != null
194- ) ''--arg account_url "${ authCfg . accountManagementUrl } " \'' }
195- '' ;
186+ masArgs = lib . escapeShellArgs (
187+ lib . optionals authCfg . enable (
188+ [
189+ "--rawfile" "client_secret" config . sops . secrets . "matrix-authentication-service/client_secret" . path
190+ "--rawfile" "admin_token" config . sops . secrets . "matrix-authentication-service/synapse_secret" . path
191+ "--arg" "issuer" authCfg . issuer
192+ "--arg" "client_id" authCfg . clientId
193+ "--arg" "client_auth_method" authCfg . clientAuthMethod
194+ ]
195+ ++ lib . optionals ( authCfg . accountManagementUrl != null ) [
196+ "--arg" "account_url" authCfg . accountManagementUrl
197+ ]
198+ )
199+ ) ;
196200 masJqExpr = lib . optionalString authCfg . enable ''
197201 * {
198202 experimental_features: {
219223 --rawfile smtp ${ config . sops . secrets . "protonmail/smtp_token" . path } \
220224 --arg notif_from "Matrix <matrix@${ VARS . domains . public } >" \
221225 --arg smtp_user "matrix@${ VARS . domains . public } " \
222- ${ masArgs }
226+ ${ masArgs } \
223227 '{
224228 registration_shared_secret: ($secret | rtrimstr("\n")),
225229 email: {
You can’t perform that action at this time.
0 commit comments