From 36c84d83601b3e9687b0a0727a00ab18f9b843a6 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Tue, 7 Apr 2020 22:47:41 +0200 Subject: [PATCH] add option clightning.onionport Analogous to electrs.onionport --- modules/presets/secure-node.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/presets/secure-node.nix b/modules/presets/secure-node.nix index ff69bf1..77b8ad2 100644 --- a/modules/presets/secure-node.nix +++ b/modules/presets/secure-node.nix @@ -22,6 +22,12 @@ in { imports = [ ../modules.nix ]; options = { + services.clightning.onionport = mkOption { + type = types.ints.u16; + default = 9735; + description = "Port on which to listen for tor client connections."; + }; + services.electrs.onionport = mkOption { type = types.ints.u16; default = 50002; @@ -71,9 +77,9 @@ in { proxy = config.services.tor.client.socksListenAddress; enforceTor = true; always-use-proxy = true; - bind-addr = "127.0.0.1:9735"; + bind-addr = "127.0.0.1:${toString config.services.clightning.onionport}"; }; - services.tor.hiddenServices.clightning = mkHiddenService { port = 9735; }; + services.tor.hiddenServices.clightning = mkHiddenService { port = config.services.clightning.onionport; }; # lnd services.lnd.enforceTor = true;