diff --git a/modules/bitcoind.nix b/modules/bitcoind.nix index 4997024..8a75f2f 100644 --- a/modules/bitcoind.nix +++ b/modules/bitcoind.nix @@ -17,7 +17,9 @@ let }; onionPort = mkOption { type = types.nullOr types.port; - default = null; + # When the bitcoind onion service is enabled, add an onion-tagged socket + # to distinguish local connections from Tor connections + default = if (config.nix-bitcoin.onionServices.bitcoind.enable or false) then 8334 else null; description = '' Port to listen for Tor peer connections. If set, inbound connections to this port are tagged as onion peers. diff --git a/modules/onion-services.nix b/modules/onion-services.nix index 8fa3549..655f579 100644 --- a/modules/onion-services.nix +++ b/modules/onion-services.nix @@ -118,10 +118,6 @@ in { externalPort = 80; }; }; - - # When the bitcoind onion service is enabled, add an onion-tagged socket - # to distinguish local connections from Tor connections - services.bitcoind.onionPort = mkIf (cfg.bitcoind.enable or false) 8334; } ]; }