From 01fa900633415079ccad71fcf9d52373e02ccb47 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 5 Sep 2022 17:45:45 +0200 Subject: [PATCH] shellcheck: fix setup-secrets.sh, spark-wallet --- modules/secrets/secrets.nix | 4 +++- modules/spark-wallet.nix | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/secrets/secrets.nix b/modules/secrets/secrets.nix index 3a5a10a..020b33a 100644 --- a/modules/secrets/secrets.nix +++ b/modules/secrets/secrets.nix @@ -210,7 +210,7 @@ in { processedFiles=() ${ concatStrings (mapAttrsToList (n: v: '' - setupSecret ${n} ${v.user} ${v.group} ${v.permissions} } + setupSecret ${n} ${v.user} ${v.group} ${v.permissions} '') cfg.secrets) } @@ -220,7 +220,9 @@ in { ) if [[ $unprocessedFiles ]]; then IFS=$'\n' + # shellcheck disable=SC2086 chown root: $unprocessedFiles + # shellcheck disable=SC2086 chmod 0440 $unprocessedFiles fi diff --git a/modules/spark-wallet.nix b/modules/spark-wallet.nix index adf6c87..ab0f5cb 100644 --- a/modules/spark-wallet.nix +++ b/modules/spark-wallet.nix @@ -51,14 +51,14 @@ let torRateProvider = "--rate-provider wasabi --proxy socks5h://${config.nix-bitcoin.torClientAddressWithPort}"; startScript = '' ${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 \ --ln-path '${clightning.networkDir}' \ --host ${cfg.address} --port ${toString cfg.port} \ --config '${config.nix-bitcoin.secretsDir}/spark-wallet-login' \ ${optionalString cfg.tor.proxy torRateProvider} \ - $publicURL \ + ${optionalString (cfg.getPublicAddressCmd != "") ''"''${publicURL[@]}"''} \ --pairing-qr --print-key ${cfg.extraArgs} ''; in {