From e5616376005136d69c238993b837535e53bbd8ff Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Fri, 1 Oct 2021 11:51:55 +0200 Subject: [PATCH] minor fixes - bitcoind: Remove obsolete defaultText - clightning: Fix description Option `address` can't be used to specify a socket path because it's used explicitly as an IP address in many places. - lnd: Break up overlong line This is required by commit `services: support 0.0.0.0/:: in `address` options` - nix-bitcoin.nix: Formatting - secrets: Improve descriptions --- modules/bitcoind.nix | 1 - modules/clightning.nix | 2 +- modules/lnd.nix | 4 +++- modules/nix-bitcoin.nix | 2 +- modules/secrets/secrets.nix | 5 +++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/bitcoind.nix b/modules/bitcoind.nix index e52b525..07da64d 100644 --- a/modules/bitcoind.nix +++ b/modules/bitcoind.nix @@ -26,7 +26,6 @@ let package = mkOption { type = types.package; default = config.nix-bitcoin.pkgs.bitcoind; - defaultText = "pkgs.blockchains.bitcoind"; description = "The package providing bitcoin binaries."; }; extraConfig = mkOption { diff --git a/modules/clightning.nix b/modules/clightning.nix index 58a59bd..070f73d 100644 --- a/modules/clightning.nix +++ b/modules/clightning.nix @@ -7,7 +7,7 @@ let address = mkOption { type = types.str; default = "127.0.0.1"; - description = "IP address or UNIX domain socket to listen for peer connections."; + description = "Address to listen for peer connections."; }; port = mkOption { type = types.port; diff --git a/modules/lnd.nix b/modules/lnd.nix index 648a2c1..8805622 100644 --- a/modules/lnd.nix +++ b/modules/lnd.nix @@ -221,7 +221,9 @@ in { in [ (nbLib.script "lnd-create-wallet" '' attempts=250 - while ! { exec 3>/dev/tcp/${cfg.restAddress}/${toString cfg.restPort} && exec 3>&-; } &>/dev/null; do + while ! { + exec 3>/dev/tcp/${cfg.restAddress}/${toString cfg.restPort} && exec 3>&- + } &>/dev/null; do ((attempts-- == 0)) && { echo "lnd REST service unreachable"; exit 1; } sleep 0.1 done diff --git a/modules/nix-bitcoin.nix b/modules/nix-bitcoin.nix index 48cb7c4..bad87c1 100644 --- a/modules/nix-bitcoin.nix +++ b/modules/nix-bitcoin.nix @@ -16,7 +16,7 @@ with lib; torClientAddressWithPort = mkOption { readOnly = true; - default = with config.services.tor.client.socksListenAddress; + default = with config.services.tor.client.socksListenAddress; "${addr}:${toString port}"; }; diff --git a/modules/secrets/secrets.nix b/modules/secrets/secrets.nix index c44ee29..ffd74f8 100644 --- a/modules/secrets/secrets.nix +++ b/modules/secrets/secrets.nix @@ -13,7 +13,8 @@ let type = types.bool; default = false; description = '' - Set permissions for existing secrets in `nix-bitcoin.secretsDir`. + Set permissions for existing secrets in `nix-bitcoin.secretsDir` + before services are started. ''; }; @@ -21,7 +22,7 @@ let type = types.bool; default = false; description = '' - Automatically generate all required secrets at system startup. + Automatically generate all required secrets before services are started. Note: Make sure to create a backup of the generated secrets. ''; };