lnd: prepare for netns and bring in line with clightning

- Adds bitcoind-host, and tor-socks options to allow using with
  network namespaces.
- Adds listen, rpclisten, and restlisten option to specify host on which
  to listen on for peer, rpc and rest connections respectively
- Adds announce-tor option and generates Tor Hidden Service with nix
  instead of lnd to bring in line with clightning.

WARNING: Breaking changes for Tor Hidden Service. Manual migration
necessary.
This commit is contained in:
nixbitcoin 2020-06-04 09:30:17 +00:00
parent 3c0c446547
commit f3d2aaa5d4
No known key found for this signature in database
GPG key ID: DD11F9AD5308B3BA
3 changed files with 62 additions and 10 deletions

View file

@ -24,6 +24,11 @@ in {
default = 9735;
description = "Port on which to listen for tor client connections.";
};
services.lnd.onionport = mkOption {
type = types.ints.u16;
default = 9735;
description = "Port on which to listen for tor client connections.";
};
services.electrs.onionport = mkOption {
type = types.port;
default = 50002;
@ -82,7 +87,11 @@ in {
services.tor.hiddenServices.clightning = mkHiddenService { port = cfg.clightning.onionport; toHost = (builtins.head (builtins.split ":" cfg.clightning.bind-addr)); };
# lnd
services.lnd.enforceTor = true;
services.lnd = {
tor-socks = cfg.tor.client.socksListenAddress;
enforceTor = true;
};
services.tor.hiddenServices.lnd = mkHiddenService { port = cfg.lnd.onionport; };
# liquidd
services.liquidd = {