From 45bfc181fc4a1d85aab088ee3b7e48bf2f573aa1 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Fri, 4 Nov 2022 11:07:36 +0100 Subject: [PATCH] clightning: extract var `bitcoind` Follow the default module formatting style. --- modules/clightning.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/clightning.nix b/modules/clightning.nix index dba8d9a..370ec40 100644 --- a/modules/clightning.nix +++ b/modules/clightning.nix @@ -102,16 +102,18 @@ let nbLib = config.nix-bitcoin.lib; nbPkgs = config.nix-bitcoin.pkgs; - network = config.services.bitcoind.makeNetworkName "bitcoin" "regtest"; + inherit (config.services) bitcoind; + + network = bitcoind.makeNetworkName "bitcoin" "regtest"; configFile = pkgs.writeText "config" '' network=${network} - bitcoin-datadir=${config.services.bitcoind.dataDir} + bitcoin-datadir=${bitcoind.dataDir} ${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"} always-use-proxy=${boolToString cfg.always-use-proxy} bind-addr=${cfg.address}:${toString cfg.port} - bitcoin-rpcconnect=${nbLib.address config.services.bitcoind.rpc.address} - bitcoin-rpcport=${toString config.services.bitcoind.rpc.port} - bitcoin-rpcuser=${config.services.bitcoind.rpc.users.public.name} + bitcoin-rpcconnect=${nbLib.address bitcoind.rpc.address} + bitcoin-rpcport=${toString bitcoind.rpc.port} + bitcoin-rpcuser=${bitcoind.rpc.users.public.name} rpc-file-mode=0660 log-timestamps=false ${optionalString (cfg.wallet != null) "wallet=${cfg.wallet}"}