From 143fe30e03495da06ff868480325b29073e0dfac Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Mon, 1 Jan 2024 14:51:14 +0000 Subject: [PATCH] bitcoind: set default ports in regtest mode --- modules/bitcoind.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/bitcoind.nix b/modules/bitcoind.nix index cb8244d..2b65795 100644 --- a/modules/bitcoind.nix +++ b/modules/bitcoind.nix @@ -12,7 +12,8 @@ let }; port = mkOption { type = types.port; - default = 8333; + default = if !cfg.regtest then 8333 else 18444; + defaultText = "if !cfg.regtest then 8333 else 18444"; description = mdDoc "Port to listen for peer connections."; }; onionPort = mkOption { @@ -84,7 +85,8 @@ let }; port = mkOption { type = types.port; - default = 8332; + default = if !cfg.regtest then 8332 else 18443; + defaultText = "if !cfg.regtest then 8332 else 18443"; description = mdDoc "Port to listen for JSON-RPC connections."; }; threads = mkOption {