From b1a862922362780e465e8a0bed18dc699a13d608 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Fri, 16 Oct 2020 17:43:05 +0200 Subject: [PATCH] lnd: add variable 'bitcoind' --- modules/lnd.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/lnd.nix b/modules/lnd.nix index c58263e..9cf87cd 100644 --- a/modules/lnd.nix +++ b/modules/lnd.nix @@ -5,8 +5,10 @@ with lib; let cfg = config.services.lnd; inherit (config) nix-bitcoin-services; - onion-chef-service = (if cfg.announce-tor then [ "onion-chef.service" ] else []); secretsDir = config.nix-bitcoin.secretsDir; + + bitcoind = config.services.bitcoind; + onion-chef-service = (if cfg.announce-tor then [ "onion-chef.service" ] else []); mainnetDir = "${cfg.dataDir}/chain/bitcoin/mainnet"; configFile = pkgs.writeText "lnd.conf" '' datadir=${cfg.dataDir} @@ -26,9 +28,9 @@ let ${optionalString (cfg.tor-socks != null) "tor.socks=${cfg.tor-socks}"} bitcoind.rpchost=${cfg.bitcoind-host} - bitcoind.rpcuser=${config.services.bitcoind.rpc.users.public.name} - bitcoind.zmqpubrawblock=${config.services.bitcoind.zmqpubrawblock} - bitcoind.zmqpubrawtx=${config.services.bitcoind.zmqpubrawtx} + bitcoind.rpcuser=${bitcoind.rpc.users.public.name} + bitcoind.zmqpubrawblock=${bitcoind.zmqpubrawblock} + bitcoind.zmqpubrawtx=${bitcoind.zmqpubrawtx} ${cfg.extraConfig} ''; @@ -148,7 +150,7 @@ in { config = mkIf cfg.enable { assertions = [ - { assertion = config.services.bitcoind.prune == 0; + { assertion = bitcoind.prune == 0; message = "lnd does not support bitcoind pruning."; } ];