From de889d584f3ae770d9a85b857bb497319e50d555 Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Thu, 14 Mar 2019 10:36:18 +0100 Subject: [PATCH 1/2] Add proxy and hidden service to liquidd --- modules/nix-bitcoin.nix | 10 +++++++++- pkgs/nodeinfo.sh | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/nix-bitcoin.nix b/modules/nix-bitcoin.nix index b6e14e0..774417b 100644 --- a/modules/nix-bitcoin.nix +++ b/modules/nix-bitcoin.nix @@ -151,7 +151,15 @@ in { mainchainrpcuser=${config.services.bitcoind.rpcuser} mainchainrpcport=8332 "; - + services.liquidd.listen = true; + services.liquidd.proxy = config.services.tor.client.socksListenAddress; + services.tor.hiddenServices.liquidd = { + map = [{ + port = 7042; toPort = 7042; + }]; + version = 3; + }; + services.lightning-charge.enable = cfg.modules == "all"; services.nanopos.enable = cfg.modules == "all"; services.nix-bitcoin-webindex.enable = cfg.modules == "all"; diff --git a/pkgs/nodeinfo.sh b/pkgs/nodeinfo.sh index c40a14e..eb849b4 100644 --- a/pkgs/nodeinfo.sh +++ b/pkgs/nodeinfo.sh @@ -17,6 +17,12 @@ if [ -e "$NGINX_ONION_FILE" ]; then echo NGINX_ONION="$NGINX_ONION" fi +LIQUIDD_ONION_FILE=/var/lib/tor/onion/liquidd/hostname +if [ -e "$LIQUIDD_ONION_FILE" ]; then + LIQUIDD_ONION="$(cat $LIQUIDD_ONION_FILE)" + echo LIQUIDD_ONION="$LIQUIDD_ONION" +fi + SPARKWALLET_ONION_FILE=/var/lib/tor/onion/spark-wallet/hostname if [ -e "$SPARKWALLET_ONION_FILE" ]; then SPARKWALLET_ONION="$(cat $SPARKWALLET_ONION_FILE)" From d6facee486a8d2a89b493a8ad2d3d9ad36a6920e Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Mon, 18 Mar 2019 14:17:38 +0100 Subject: [PATCH 2/2] Add config.services.liquidd.port --- modules/nix-bitcoin.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nix-bitcoin.nix b/modules/nix-bitcoin.nix index 774417b..b80df17 100644 --- a/modules/nix-bitcoin.nix +++ b/modules/nix-bitcoin.nix @@ -153,9 +153,10 @@ in { "; services.liquidd.listen = true; services.liquidd.proxy = config.services.tor.client.socksListenAddress; + services.liquidd.port = 7042; services.tor.hiddenServices.liquidd = { map = [{ - port = 7042; toPort = 7042; + port = config.services.liquidd.port; toPort = config.services.liquidd.port; }]; version = 3; };