bitcoind: set onionPort in bitcoind module
This removes the module-level dependency from onion-services to bitcoind. Due to the `or false` fallback, there's no dependency added in the reverse direction. In particular, this allows us to not add a dependency on liquidd in the following commit.
This commit is contained in:
parent
20d4240919
commit
cc3d43f4e9
@ -17,7 +17,9 @@ let
|
|||||||
};
|
};
|
||||||
onionPort = mkOption {
|
onionPort = mkOption {
|
||||||
type = types.nullOr types.port;
|
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 = ''
|
description = ''
|
||||||
Port to listen for Tor peer connections.
|
Port to listen for Tor peer connections.
|
||||||
If set, inbound connections to this port are tagged as onion peers.
|
If set, inbound connections to this port are tagged as onion peers.
|
||||||
|
@ -118,10 +118,6 @@ in {
|
|||||||
externalPort = 80;
|
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;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user