lnd: add netns cli script
This commit is contained in:
parent
c55296433d
commit
4b8ca52647
@ -107,7 +107,6 @@ in {
|
|||||||
description = "The package providing lnd binaries.";
|
description = "The package providing lnd binaries.";
|
||||||
};
|
};
|
||||||
cli = mkOption {
|
cli = mkOption {
|
||||||
readOnly = true;
|
|
||||||
default = pkgs.writeScriptBin "lncli"
|
default = pkgs.writeScriptBin "lncli"
|
||||||
# Switch user because lnd makes datadir contents readable by user only
|
# Switch user because lnd makes datadir contents readable by user only
|
||||||
''
|
''
|
||||||
|
@ -207,6 +207,12 @@ in {
|
|||||||
"127.0.0.1"
|
"127.0.0.1"
|
||||||
];
|
];
|
||||||
bitcoind-host = netns.bitcoind.address;
|
bitcoind-host = netns.bitcoind.address;
|
||||||
|
cli = pkgs.writeScriptBin "lncli"
|
||||||
|
# Switch user because lnd makes datadir contents readable by user only
|
||||||
|
''
|
||||||
|
netns-exec nb-lnd sudo -u lnd ${config.services.lnd.package}/bin/lncli --tlscertpath ${config.nix-bitcoin.secretsDir}/lnd-cert \
|
||||||
|
--macaroonpath '${config.services.lnd.dataDir}/chain/bitcoin/mainnet/admin.macaroon' "$@"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user