netns: don't repeat cli definitions

1. Saves some code.
2. Guarantees that the netns and no-netns cli defs are always in sync.
This commit is contained in:
Erik Arvstedt
2020-08-25 11:40:27 +02:00
parent e385c73256
commit 9715134f06
6 changed files with 32 additions and 37 deletions
+2 -1
View File
@@ -115,11 +115,12 @@ in {
default = pkgs.writeScriptBin "lncli"
# Switch user because lnd makes datadir contents readable by user only
''
exec sudo -u lnd ${cfg.package}/bin/lncli --tlscertpath ${secretsDir}/lnd-cert \
${cfg.cliExec} sudo -u lnd ${cfg.package}/bin/lncli --tlscertpath ${secretsDir}/lnd-cert \
--macaroonpath '${cfg.dataDir}/chain/bitcoin/mainnet/admin.macaroon' "$@"
'';
description = "Binary to connect with the lnd instance.";
};
inherit (nix-bitcoin-services) cliExec;
enforceTor = nix-bitcoin-services.enforceTor;
};