bitcoind: add cli option
This commit is contained in:
parent
8807b9f6b2
commit
55e73f32e3
@ -209,6 +209,14 @@ in {
|
||||
example = "tcp://127.0.0.1:28333";
|
||||
description = "ZMQ address for zmqpubrawtx notifications";
|
||||
};
|
||||
cli = mkOption {
|
||||
type = types.package;
|
||||
readOnly = true;
|
||||
default = pkgs.writeScriptBin "bitcoin-cli" ''
|
||||
exec ${cfg.package}/bin/bitcoin-cli -datadir='${cfg.dataDir}' "$@"
|
||||
'';
|
||||
description = "Binary to connect with the bitcoind instance.";
|
||||
};
|
||||
enforceTor = nix-bitcoin-services.enforceTor;
|
||||
};
|
||||
};
|
||||
|
@ -119,7 +119,6 @@ in {
|
||||
services.onion-chef.access.operator = [ "bitcoind" "clightning" "nginx" "liquidd" "spark-wallet" "electrs" "sshd" ];
|
||||
|
||||
environment.interactiveShellInit = ''
|
||||
alias bitcoin-cli='bitcoin-cli -datadir=${config.services.bitcoind.dataDir}'
|
||||
${optionalString (config.services.clightning.enable) ''
|
||||
alias lightning-cli='sudo -u clightning lightning-cli --lightning-dir=${config.services.clightning.dataDir}'
|
||||
''}
|
||||
@ -188,6 +187,7 @@ in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
tor
|
||||
blockchains.bitcoind
|
||||
(hiPrio config.services.bitcoind.cli)
|
||||
nodeinfo
|
||||
banlist
|
||||
jq
|
||||
|
Loading…
Reference in New Issue
Block a user