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";
|
example = "tcp://127.0.0.1:28333";
|
||||||
description = "ZMQ address for zmqpubrawtx notifications";
|
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;
|
enforceTor = nix-bitcoin-services.enforceTor;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -119,7 +119,6 @@ in {
|
|||||||
services.onion-chef.access.operator = [ "bitcoind" "clightning" "nginx" "liquidd" "spark-wallet" "electrs" "sshd" ];
|
services.onion-chef.access.operator = [ "bitcoind" "clightning" "nginx" "liquidd" "spark-wallet" "electrs" "sshd" ];
|
||||||
|
|
||||||
environment.interactiveShellInit = ''
|
environment.interactiveShellInit = ''
|
||||||
alias bitcoin-cli='bitcoin-cli -datadir=${config.services.bitcoind.dataDir}'
|
|
||||||
${optionalString (config.services.clightning.enable) ''
|
${optionalString (config.services.clightning.enable) ''
|
||||||
alias lightning-cli='sudo -u clightning lightning-cli --lightning-dir=${config.services.clightning.dataDir}'
|
alias lightning-cli='sudo -u clightning lightning-cli --lightning-dir=${config.services.clightning.dataDir}'
|
||||||
''}
|
''}
|
||||||
@ -188,6 +187,7 @@ in {
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
tor
|
tor
|
||||||
blockchains.bitcoind
|
blockchains.bitcoind
|
||||||
|
(hiPrio config.services.bitcoind.cli)
|
||||||
nodeinfo
|
nodeinfo
|
||||||
banlist
|
banlist
|
||||||
jq
|
jq
|
||||||
|
Loading…
Reference in New Issue
Block a user