clightning: extract var bitcoind
Follow the default module formatting style.
This commit is contained in:
parent
1b5e51b7fe
commit
d332177d3e
@ -102,16 +102,18 @@ let
|
|||||||
nbLib = config.nix-bitcoin.lib;
|
nbLib = config.nix-bitcoin.lib;
|
||||||
nbPkgs = config.nix-bitcoin.pkgs;
|
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" ''
|
configFile = pkgs.writeText "config" ''
|
||||||
network=${network}
|
network=${network}
|
||||||
bitcoin-datadir=${config.services.bitcoind.dataDir}
|
bitcoin-datadir=${bitcoind.dataDir}
|
||||||
${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"}
|
${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"}
|
||||||
always-use-proxy=${boolToString cfg.always-use-proxy}
|
always-use-proxy=${boolToString cfg.always-use-proxy}
|
||||||
bind-addr=${cfg.address}:${toString cfg.port}
|
bind-addr=${cfg.address}:${toString cfg.port}
|
||||||
bitcoin-rpcconnect=${nbLib.address config.services.bitcoind.rpc.address}
|
bitcoin-rpcconnect=${nbLib.address bitcoind.rpc.address}
|
||||||
bitcoin-rpcport=${toString config.services.bitcoind.rpc.port}
|
bitcoin-rpcport=${toString bitcoind.rpc.port}
|
||||||
bitcoin-rpcuser=${config.services.bitcoind.rpc.users.public.name}
|
bitcoin-rpcuser=${bitcoind.rpc.users.public.name}
|
||||||
rpc-file-mode=0660
|
rpc-file-mode=0660
|
||||||
log-timestamps=false
|
log-timestamps=false
|
||||||
${optionalString (cfg.wallet != null) "wallet=${cfg.wallet}"}
|
${optionalString (cfg.wallet != null) "wallet=${cfg.wallet}"}
|
||||||
|
Loading…
Reference in New Issue
Block a user