refactor: extract bitcoin stack into Sovran_Bitcoin flake input

Decouple the Bitcoin/Lightning modules and packages into the standalone
Sovran_Bitcoin flake, consumed as a NixOS module input.

Deleted (now in Sovran_Bitcoin):
  - modules/bitcoin/          (19 files — vendored nix-bitcoin modules)
  - modules/bitcoinecosystem.nix
  - modules/nwc-wallets.nix
  - modules/mempool.nix
  - packages/{albyhub,mempool,rtl,build-support}/
  - tests/bitcoin-btcpay-hardening.nix

Created:
  - modules/sovran-bitcoin-integration.nix — the OS-specific bridge that
    maps sovran_systemsOS.* options to sovran-bitcoin.* and applies
    Second_Drive paths, operator 'free', forced wallet, firewall 3051,
    and Sovran Hub NWC environment wiring.

Modified:
  - flake.nix — added sovran-bitcoin flake input, updated module imports
  - modules/modules.nix — removed deleted imports
  - modules/core/sovran-hub.nix — version metadata now reads from
    pkgs.sovran-bitcoin.* overlay instead of local packages/
  - tests/test_bitcoin_tor_gossip.py — updated to check integration layer

The sovran_systemsOS.* option namespace is preserved. The Hub, roles,
and custom.nix continue to work unchanged.
This commit is contained in:
Sovran Patch
2026-08-31 10:17:14 -05:00
committed by naturallaw777
parent 043981a34b
commit 362fa0b36c
41 changed files with 180 additions and 4093 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
{
config = lib.mkMerge [
# Vendored nix-bitcoin is always imported via modules/vendor/nix-bitcoin/modules.nix.
# The Sovran_Bitcoin flake module is always imported (see flake.nix).
# This default satisfies the secrets assertion so Desktop-Only systems evaluate
# without enabling any Bitcoin services.
{
+6 -5
View File
@@ -135,12 +135,13 @@ let
"bitcoind.service" = if pkgs ? bitcoind then pkgs.bitcoind.version else "27.1.0";
"electrs.service" = if pkgs ? electrs then pkgs.electrs.version else "0.10.6";
"lnd.service" = if pkgs ? lnd then pkgs.lnd.version else "0.18.0";
# Evaluate locally vendored packages directly so we don't accidentally
# pick up older/different versions from upstream nixpkgs.
"rtl.service" = (pkgs.callPackage ../../packages/rtl { fetchNodeModules = pkgs.callPackage ../../packages/build-support/fetch-node-modules.nix {}; }).version;
# Vendored packages come from the Sovran_Bitcoin flake overlay
# (pkgs.sovran-bitcoin.*). Evaluate them directly so the Hub shows
# the exact versions this system ships.
"rtl.service" = pkgs.sovran-bitcoin.rtl.version;
"btcpayserver.service" = lib.getVersion config.services.btcpayserver.package;
"albyhub.service" = (pkgs.callPackage ../../packages/albyhub {}).version;
"mempool.service" = (pkgs.callPackage ../../packages/mempool { fetchNodeModules = pkgs.callPackage ../../packages/build-support/fetch-node-modules.nix {}; }).version;
"albyhub.service" = pkgs.sovran-bitcoin.albyhub.version;
"mempool.service" = pkgs.sovran-bitcoin.mempool-backend.version;
"matrix-synapse.service" = if pkgs ? matrix-synapse then pkgs.matrix-synapse.version else "1.115.0";
"livekit.service" = if pkgs ? livekit then pkgs.livekit.version else "1.5.2";
"vaultwarden.service" = if pkgs ? vaultwarden then pkgs.vaultwarden.version else "1.32.0";