lnd: remove redundant option 'bitcoind-host'
Also set bitcoind rpc port.
This commit is contained in:
parent
b1a8629223
commit
1935c252ec
@ -8,6 +8,7 @@ let
|
|||||||
secretsDir = config.nix-bitcoin.secretsDir;
|
secretsDir = config.nix-bitcoin.secretsDir;
|
||||||
|
|
||||||
bitcoind = config.services.bitcoind;
|
bitcoind = config.services.bitcoind;
|
||||||
|
bitcoindRpcAddress = builtins.elemAt bitcoind.rpcbind 0;
|
||||||
onion-chef-service = (if cfg.announce-tor then [ "onion-chef.service" ] else []);
|
onion-chef-service = (if cfg.announce-tor then [ "onion-chef.service" ] else []);
|
||||||
mainnetDir = "${cfg.dataDir}/chain/bitcoin/mainnet";
|
mainnetDir = "${cfg.dataDir}/chain/bitcoin/mainnet";
|
||||||
configFile = pkgs.writeText "lnd.conf" ''
|
configFile = pkgs.writeText "lnd.conf" ''
|
||||||
@ -27,7 +28,7 @@ let
|
|||||||
tor.active=true
|
tor.active=true
|
||||||
${optionalString (cfg.tor-socks != null) "tor.socks=${cfg.tor-socks}"}
|
${optionalString (cfg.tor-socks != null) "tor.socks=${cfg.tor-socks}"}
|
||||||
|
|
||||||
bitcoind.rpchost=${cfg.bitcoind-host}
|
bitcoind.rpchost=${bitcoindRpcAddress}:${toString bitcoind.rpc.port}
|
||||||
bitcoind.rpcuser=${bitcoind.rpc.users.public.name}
|
bitcoind.rpcuser=${bitcoind.rpc.users.public.name}
|
||||||
bitcoind.zmqpubrawblock=${bitcoind.zmqpubrawblock}
|
bitcoind.zmqpubrawblock=${bitcoind.zmqpubrawblock}
|
||||||
bitcoind.zmqpubrawtx=${bitcoind.zmqpubrawtx}
|
bitcoind.zmqpubrawtx=${bitcoind.zmqpubrawtx}
|
||||||
@ -83,13 +84,6 @@ in {
|
|||||||
default = 8080;
|
default = 8080;
|
||||||
description = "Port on which to listen for REST connections.";
|
description = "Port on which to listen for REST connections.";
|
||||||
};
|
};
|
||||||
bitcoind-host = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "127.0.0.1";
|
|
||||||
description = ''
|
|
||||||
The host that your local bitcoind daemon is listening on.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
tor-socks = mkOption {
|
tor-socks = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
@ -162,8 +156,8 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
services.bitcoind = {
|
services.bitcoind = {
|
||||||
zmqpubrawblock = "tcp://${cfg.bitcoind-host}:28332";
|
zmqpubrawblock = "tcp://${bitcoindRpcAddress}:28332";
|
||||||
zmqpubrawtx = "tcp://${cfg.bitcoind-host}:28333";
|
zmqpubrawtx = "tcp://${bitcoindRpcAddress}:28333";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.onion-chef.access.lnd = if cfg.announce-tor then [ "lnd" ] else [];
|
services.onion-chef.access.lnd = if cfg.announce-tor then [ "lnd" ] else [];
|
||||||
|
@ -279,7 +279,6 @@ in {
|
|||||||
"${netns.lnd.address}"
|
"${netns.lnd.address}"
|
||||||
"127.0.0.1"
|
"127.0.0.1"
|
||||||
];
|
];
|
||||||
bitcoind-host = netns.bitcoind.address;
|
|
||||||
cliExec = mkCliExec "lnd";
|
cliExec = mkCliExec "lnd";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user