lnd: add netns

- Adds lnd to netns-isolation.services
- Specifies listen option (defaults to localhost) as target of
  hiddenService.
- Amends hardcoded lnd ip to lnd-cert

WARNING: Breaking changes for lnd cert. lnd-key and lnd-cert will have
to be deleted and redeployed.
This commit is contained in:
nixbitcoin 2020-06-10 14:34:14 +00:00
parent f3d2aaa5d4
commit c55296433d
No known key found for this signature in database
GPG key ID: DD11F9AD5308B3BA
3 changed files with 21 additions and 1 deletions

View file

@ -92,6 +92,10 @@ in {
id = 13;
connections = [ "bitcoind" ];
};
lnd = {
id = 14;
connections = [ "bitcoind" ];
};
};
systemd.services = {
@ -191,6 +195,20 @@ in {
bind-addr = "${netns.clightning.address}:${toString config.services.clightning.onionport}";
};
# lnd: Custom netns configs
services.lnd = mkIf config.services.lnd.enable {
listen = netns.lnd.address;
rpclisten = [
"${netns.lnd.address}"
"127.0.0.1"
];
restlisten = [
"${netns.lnd.address}"
"127.0.0.1"
];
bitcoind-host = netns.bitcoind.address;
};
})
# Custom netns config option values if netns-isolation not enabled
(mkIf (!cfg.enable) {