shellcheck: fix setup-secrets.sh, spark-wallet

This commit is contained in:
Erik Arvstedt 2022-09-05 17:45:45 +02:00 committed by Otto Sabart
parent ee15837244
commit 01fa900633
No known key found for this signature in database
GPG Key ID: 823BAE99F8BE1E3C
2 changed files with 5 additions and 3 deletions

View File

@ -210,7 +210,7 @@ in {
processedFiles=() processedFiles=()
${ ${
concatStrings (mapAttrsToList (n: v: '' concatStrings (mapAttrsToList (n: v: ''
setupSecret ${n} ${v.user} ${v.group} ${v.permissions} } setupSecret ${n} ${v.user} ${v.group} ${v.permissions}
'') cfg.secrets) '') cfg.secrets)
} }
@ -220,7 +220,9 @@ in {
) )
if [[ $unprocessedFiles ]]; then if [[ $unprocessedFiles ]]; then
IFS=$'\n' IFS=$'\n'
# shellcheck disable=SC2086
chown root: $unprocessedFiles chown root: $unprocessedFiles
# shellcheck disable=SC2086
chmod 0440 $unprocessedFiles chmod 0440 $unprocessedFiles
fi fi

View File

@ -51,14 +51,14 @@ let
torRateProvider = "--rate-provider wasabi --proxy socks5h://${config.nix-bitcoin.torClientAddressWithPort}"; torRateProvider = "--rate-provider wasabi --proxy socks5h://${config.nix-bitcoin.torClientAddressWithPort}";
startScript = '' startScript = ''
${optionalString (cfg.getPublicAddressCmd != "") '' ${optionalString (cfg.getPublicAddressCmd != "") ''
publicURL="--public-url http://$(${cfg.getPublicAddressCmd})" publicURL=(--public-url "http://$(${cfg.getPublicAddressCmd})")
''} ''}
exec ${config.nix-bitcoin.pkgs.spark-wallet}/bin/spark-wallet \ exec ${config.nix-bitcoin.pkgs.spark-wallet}/bin/spark-wallet \
--ln-path '${clightning.networkDir}' \ --ln-path '${clightning.networkDir}' \
--host ${cfg.address} --port ${toString cfg.port} \ --host ${cfg.address} --port ${toString cfg.port} \
--config '${config.nix-bitcoin.secretsDir}/spark-wallet-login' \ --config '${config.nix-bitcoin.secretsDir}/spark-wallet-login' \
${optionalString cfg.tor.proxy torRateProvider} \ ${optionalString cfg.tor.proxy torRateProvider} \
$publicURL \ ${optionalString (cfg.getPublicAddressCmd != "") ''"''${publicURL[@]}"''} \
--pairing-qr --print-key ${cfg.extraArgs} --pairing-qr --print-key ${cfg.extraArgs}
''; '';
in { in {