From fed52a19a9125495e9ab1d0104cf01fc4c0c31ac Mon Sep 17 00:00:00 2001 From: Bitcoin Txoko <142011724+bitcointxoko@users.noreply.github.com> Date: Sun, 21 Jul 2024 11:53:10 +0200 Subject: [PATCH] Create bitcoind.nix --- system/bitcoin/bitcoind.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 system/bitcoin/bitcoind.nix diff --git a/system/bitcoin/bitcoind.nix b/system/bitcoin/bitcoind.nix new file mode 100644 index 0000000..9d47c36 --- /dev/null +++ b/system/bitcoin/bitcoind.nix @@ -0,0 +1,24 @@ +{config, ...}: { + services.bitcoind = { + enable = true; + prune = 0; + txindex = true; + zmqpubrawtx = "tcp://127.0.0.1:28333"; + zmqpubrawblock = "tcp://127.0.0.1:28332"; + listen = true; + address = "0.0.0.0"; + rpc = { + address = "0.0.0.0"; + allowip = [ + "10.10.0.0/24" # Allow on a subnet + "10.50.0.3" # Allow on a specific address + "0.0.0.0/0" # Allow on all addresses + ]; + }; + }; + networking.firewall.allowedTCPPorts = [ + config.services.bitcoind.port + config.services.bitcoind.rpc.port + ]; + nix-bitcoin.onionServices.bitcoind.public = true; +}