From c0b02ac93a30abd606efe3f024bc2f1bb3beb33e Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Thu, 18 Jun 2020 10:21:17 +0000 Subject: [PATCH] liquid: add netns cli script --- modules/liquid.nix | 2 -- modules/netns-isolation.nix | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/liquid.nix b/modules/liquid.nix index 64cce23..ea15e31 100644 --- a/modules/liquid.nix +++ b/modules/liquid.nix @@ -210,14 +210,12 @@ in { ''; }; cli = mkOption { - readOnly = true; default = pkgs.writeScriptBin "elements-cli" '' exec ${pkgs.nix-bitcoin.elementsd}/bin/elements-cli -datadir='${cfg.dataDir}' "$@" ''; description = "Binary to connect with the liquidd instance."; }; swap-cli = mkOption { - readOnly = true; default = pkgs.writeScriptBin "liquidswap-cli" '' exec ${pkgs.nix-bitcoin.liquid-swap}/bin/liquidswap-cli -c '${cfg.dataDir}/elements.conf' "$@" ''; diff --git a/modules/netns-isolation.nix b/modules/netns-isolation.nix index 7e2968a..73989d0 100644 --- a/modules/netns-isolation.nix +++ b/modules/netns-isolation.nix @@ -232,6 +232,12 @@ in { "${netns.${s}.address}" ]) netns.liquidd.availableNetns; mainchainrpchost = netns.bitcoind.address; + cli = pkgs.writeScriptBin "elements-cli" '' + netns-exec nb-liquidd ${pkgs.nix-bitcoin.elementsd}/bin/elements-cli -datadir='${config.services.liquidd.dataDir}' "$@" + ''; + swap-cli = pkgs.writeScriptBin "liquidswap-cli" '' + netns-exec nb-liquidd ${pkgs.nix-bitcoin.liquid-swap}/bin/liquidswap-cli -c '${config.services.liquidd.dataDir}/elements.conf' "$@" + ''; }; })