From 6c2c69d18ac271765f32eeeb3d060f8e29754e17 Mon Sep 17 00:00:00 2001 From: Sovran Fix Date: Mon, 10 Aug 2026 09:26:25 +0000 Subject: [PATCH] fix: remove clightning and clightning-rest from stubs to avoid duplicate on f13ff45 - f13ff45 (staging-dev) HAS both services -> unconditional stubs duplicate - Remove both from stubs.nix, keep only liquidd/fulcrum/etc. - lndconnect.nix left as is (defines clightning-rest.lndconnect) - safe on f13ff45 where base exists - On 8b8c811 where clightning is removed, Sovran doesn't use it anyway (lnd only), so guards in btcpayserver/lnd prevent use --- modules/vendor/nix-bitcoin/lnd.nix | 4 ++-- modules/vendor/nix-bitcoin/stubs.nix | 35 ++++------------------------ 2 files changed, 7 insertions(+), 32 deletions(-) diff --git a/modules/vendor/nix-bitcoin/lnd.nix b/modules/vendor/nix-bitcoin/lnd.nix index 7f2212f..64d3d27 100644 --- a/modules/vendor/nix-bitcoin/lnd.nix +++ b/modules/vendor/nix-bitcoin/lnd.nix @@ -194,8 +194,8 @@ in { assertions = [ { assertion = !(config.services ? clightning) - || !(config.services.clightning.enable or false) - || (config.services.clightning.port or 9735) != cfg.port; + || !((config.services.clightning or {}).enable or false) + || (((config.services.clightning or {}).port or 9735) != cfg.port); message = '' LND and clightning can't both bind to lightning port 9735. Either disable LND/clightning or change services.clightning.port or diff --git a/modules/vendor/nix-bitcoin/stubs.nix b/modules/vendor/nix-bitcoin/stubs.nix index bc1c279..8bf5a78 100644 --- a/modules/vendor/nix-bitcoin/stubs.nix +++ b/modules/vendor/nix-bitcoin/stubs.nix @@ -1,50 +1,25 @@ -{ config, lib, ... }: +{ lib, ... }: with lib; { - # Stubs for services that vendored nix-bitcoin modules reference - # but are not provided by nixpkgs/nixos-unstable 2026-08-08. - # Sovran never enables these — they just need to exist so evaluation doesn't throw - # "option does not exist". + # Stubs for services referenced by vendored nix-bitcoin modules but not in nixpkgs + # clightning and clightning-rest are NOT stubbed - they exist in nixpkgs f13ff45 + # (clightning removed in 8b8c811, but handled via guards in btcpayserver/lnd) + # Other services don't exist in either nixpkgs version, so unconditional is safe. - options.services.clightning = mkOption { type = types.attrs; default = {}; description = "stub"; }; - options.services.clightning.enable = mkOption { type = types.bool; default = false; }; - options.services.clightning.port = mkOption { type = types.port; default = 9735; }; - options.services.clightning.dataDir = mkOption { type = types.path; default = "/var/lib/clightning"; }; - options.services.clightning.user = mkOption { type = types.str; default = "clightning"; }; - options.services.clightning.group = mkOption { type = types.str; default = "clightning"; }; - options.services.clightning.address = mkOption { type = types.str; default = "127.0.0.1"; }; - options.services.clightning.rpc = mkOption { type = types.attrs; default = {}; }; - options.services.clightning.networkDir = mkOption { type = types.path; default = "/var/lib/clightning/bitcoin"; }; - options.services.clightning.plugins = mkOption { type = types.attrs; default = {}; }; - options.services.clightning.plugins.clnrest = mkOption { type = types.attrs; default = {}; }; - options.services.clightning.plugins.clnrest.enable = mkOption { type = types.bool; default = false; }; - options.services.clightning.plugins.clnrest.address = mkOption { type = types.str; default = "127.0.0.1"; }; - options.services.clightning.plugins.clnrest.port = mkOption { type = types.port; default = 3010; }; - - options.services.clightning-rest = mkOption { type = types.attrs; default = {}; }; - options.services.clightning-rest.enable = mkOption { type = types.bool; default = false; }; - - options.services.liquidd = mkOption { type = types.attrs; default = {}; }; options.services.liquidd.enable = mkOption { type = types.bool; default = false; }; options.services.liquidd.dataDir = mkOption { type = types.path; default = "/var/lib/liquidd"; }; options.services.liquidd.address = mkOption { type = types.str; default = "127.0.0.1"; }; options.services.liquidd.port = mkOption { type = types.port; default = 7041; }; - options.services.liquidd.rpc = mkOption { type = types.attrs; default = {}; }; options.services.liquidd.rpc.address = mkOption { type = types.str; default = "127.0.0.1"; }; options.services.liquidd.rpc.port = mkOption { type = types.port; default = 7040; }; options.services.liquidd.rpcuser = mkOption { type = types.str; default = "liquiddrpc"; }; options.services.liquidd.whitelistedPort = mkOption { type = types.port; default = 7042; }; options.services.liquidd.group = mkOption { type = types.str; default = "liquidd"; }; - options.services.fulcrum = mkOption { type = types.attrs; default = {}; }; options.services.fulcrum.enable = mkOption { type = types.bool; default = false; }; - options.services.lightning-loop = mkOption { type = types.attrs; default = {}; }; options.services.lightning-loop.enable = mkOption { type = types.bool; default = false; }; - options.services.lightning-pool = mkOption { type = types.attrs; default = {}; }; options.services.lightning-pool.enable = mkOption { type = types.bool; default = false; }; - options.services.joinmarket = mkOption { type = types.attrs; default = {}; }; options.services.joinmarket.enable = mkOption { type = types.bool; default = false; }; - options.services.joinmarket-ob-watcher = mkOption { type = types.attrs; default = {}; }; options.services.joinmarket-ob-watcher.enable = mkOption { type = types.bool; default = false; }; }