From ca191275845c4ba2ce2ab06a3164ccb75da444ce Mon Sep 17 00:00:00 2001 From: Padreug Date: Sun, 24 May 2026 22:40:02 +0200 Subject: [PATCH] feat: add lnbitsNostrTransportPubkey option New services.webapp.lnbitsNostrTransportPubkey threads through as VITE_LNBITS_NOSTR_TRANSPORT_PUBKEY at build time. Empty default keeps existing hosts unaffected; set per-host to opt into addressing the lnbits backend over Nostr (NIP-44 v2 kind-21000 RPC) instead of plain HTTP. Co-Authored-By: Claude Opus 4.7 (1M context) --- webapp.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/webapp.nix b/webapp.nix index 66c0524..20495fd 100644 --- a/webapp.nix +++ b/webapp.nix @@ -41,6 +41,7 @@ let VITE_LNBITS_BASE_URL = cfg.lnbitsBaseUrl; VITE_LNBITS_DEBUG = if cfg.lnbitsDebug then "true" else "false"; VITE_WEBSOCKET_ENABLED = if cfg.websocketEnabled then "true" else "false"; + VITE_LNBITS_NOSTR_TRANSPORT_PUBKEY = cfg.lnbitsNostrTransportPubkey; # Lightning Address Domain VITE_LIGHTNING_DOMAIN = cfg.lightningDomain; @@ -179,6 +180,18 @@ in { description = "Enable LNBits debug mode"; }; + lnbitsNostrTransportPubkey = lib.mkOption { + type = lib.types.str; + default = ""; + example = "ac766168d4f3232772b16002a059cdf2ffed7293a25da620a2ddbdab7691c07f"; + description = '' + Hex-encoded Nostr public key identifying the LNbits instance on + the relay network. The webapp uses this to address NIP-44 v2 + encrypted kind-21000 RPC requests at the lnbits backend over + Nostr instead of HTTP. Empty string = nostr transport disabled. + ''; + }; + websocketEnabled = lib.mkOption { type = lib.types.bool; default = true;