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-21 22:36:00 +02:00
parent e385c73256
commit 9715134f06
No known key found for this signature in database
GPG key ID: 33312B944DD97846
6 changed files with 32 additions and 37 deletions

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;
};