Squirtle runs bitcoind, lnd, electrs and mempool. Remove every other service module and its packages (clightning and plugins, joinmarket, btcpayserver/nbxplorer, rtl, liquid, lndconnect, loop, pool, charge-lnd, fulcrum, hardware-wallets, python-packages, bitcoind_29), plus the support features squirtle doesn't use: netns-isolation, i2p support in bitcoind, backups, versioning, obsolete-options and the krops/nixops deployment modules. mempool loses its electrumServer option and always uses electrs. Squirtle's system is unchanged on 26.05 apart from two blank lines in bitcoin.conf, and it now evaluates on 26.11 without the i2pd patch on branch nixos-26.11. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
817 B
Nix
37 lines
817 B
Nix
{ lib, config, ... }:
|
|
let
|
|
defaultTrue = lib.mkDefault true;
|
|
defaultEnableTorProxy = {
|
|
tor.proxy = defaultTrue;
|
|
tor.enforce = defaultTrue;
|
|
};
|
|
defaultEnforceTor = {
|
|
tor.enforce = defaultTrue;
|
|
};
|
|
in {
|
|
services.tor = {
|
|
enable = true;
|
|
client.enable = true;
|
|
};
|
|
|
|
services = {
|
|
# Use Tor as a proxy for outgoing connections
|
|
# and restrict all connections to Tor
|
|
#
|
|
bitcoind = defaultEnableTorProxy;
|
|
lnd = defaultEnableTorProxy;
|
|
mempool = defaultEnableTorProxy;
|
|
|
|
# These services don't make outgoing connections
|
|
# but we restrict them to Tor just to be safe.
|
|
#
|
|
electrs = defaultEnforceTor;
|
|
};
|
|
|
|
# Add onion services for incoming connections
|
|
nix-bitcoin.onionServices = {
|
|
bitcoind.enable = defaultTrue;
|
|
electrs.enable = defaultTrue;
|
|
};
|
|
}
|