lnd: add listenPort option

This commit is contained in:
nixbitcoin 2020-08-04 07:45:02 +00:00
parent 43da15557d
commit 716e98789c
No known key found for this signature in database
GPG Key ID: DD11F9AD5308B3BA
2 changed files with 7 additions and 2 deletions

View File

@ -14,7 +14,7 @@ let
tlscertpath=${secretsDir}/lnd-cert
tlskeypath=${secretsDir}/lnd-key
listen=${toString cfg.listen}
listen=${toString cfg.listen}:${toString cfg.listenPort}
${lib.concatMapStrings (rpclisten: "rpclisten=${rpclisten}:${toString cfg.rpcPort}\n") cfg.rpclisten}
${lib.concatMapStrings (restlisten: "restlisten=${restlisten}:${toString cfg.restPort}\n") cfg.restlisten}
@ -51,6 +51,11 @@ in {
default = "localhost";
description = "Bind to given address to listen to peer connections";
};
listenPort = mkOption {
type = types.port;
default = 9735;
description = "Bind to given port to listen to peer connections";
};
rpclisten = mkOption {
type = types.listOf types.str;
default = [ "localhost" ];

View File

@ -163,7 +163,7 @@ in {
tor-socks = cfg.tor.client.socksListenAddress;
enforceTor = true;
};
services.tor.hiddenServices.lnd = mkIf cfg.lnd.enable (mkHiddenService { port = cfg.lnd.onionport; toHost = cfg.lnd.listen; });
services.tor.hiddenServices.lnd = mkIf cfg.lnd.enable (mkHiddenService { port = cfg.lnd.onionport; toHost = cfg.lnd.listen; toPort = cfg.lnd.listenPort; });
# lightning-loop
services.lightning-loop = {