From f557a6d2dbd5720bd528327c2376738984e5af0d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Jul 2026 14:26:00 +0000 Subject: [PATCH 1/2] Initial plan From bfa4f2f9e4522cd6e8d4c30eb59152e5957df734 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Jul 2026 14:29:27 +0000 Subject: [PATCH 2/2] Fix NWC wallet cert-path env wiring --- modules/nwc-wallets.nix | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/modules/nwc-wallets.nix b/modules/nwc-wallets.nix index e9b7245..9ef9c30 100644 --- a/modules/nwc-wallets.nix +++ b/modules/nwc-wallets.nix @@ -14,6 +14,19 @@ let lndRpcAddress = lib.attrByPath [ "services" "lnd" "rpcAddress" ] "127.0.0.1" config; lndRpcPort = toString (lib.attrByPath [ "services" "lnd" "rpcPort" ] 10009 config); lndCertPath = config.services.lnd.certPath; + pythonManagerEnvironment = { + NWC_ALBY_HUB_API_BASE = albyHubApiBase; + NWC_LND_ADDRESS = "${lndRpcAddress}:${lndRpcPort}"; + NWC_LND_CERT_FILE = lndCertPath; + NWC_LND_MACAROON_FILE = "/run/lnd/albyhub.macaroon"; + }; + wrappedNwcWallet = lib.hiPrio (pkgs.writeShellScriptBin "nwc-wallet" '' + export NWC_ALBY_HUB_API_BASE='${pythonManagerEnvironment.NWC_ALBY_HUB_API_BASE}' + export NWC_LND_ADDRESS='${pythonManagerEnvironment.NWC_LND_ADDRESS}' + export NWC_LND_CERT_FILE='${pythonManagerEnvironment.NWC_LND_CERT_FILE}' + export NWC_LND_MACAROON_FILE='${pythonManagerEnvironment.NWC_LND_MACAROON_FILE}' + exec ${config.services.sovranHub.webPackage}/bin/nwc-wallet "$@" + ''); albyhubWrapper = pkgs.writeShellScript "albyhub-wrapper" '' set -euo pipefail @@ -125,7 +138,7 @@ lib.mkIf config.sovran_systemsOS.features."nwc-wallets" { wantedBy = [ "multi-user.target" ]; after = [ "albyhub.service" "sovran-hub-web.service" ]; wants = [ "albyhub.service" ]; - environment.NWC_ALBY_HUB_API_BASE = albyHubApiBase; + environment = pythonManagerEnvironment; serviceConfig = { Type = "simple"; @@ -146,12 +159,9 @@ lib.mkIf config.sovran_systemsOS.features."nwc-wallets" { }; }; - systemd.services.sovran-hub-web.environment = { - NWC_ALBY_HUB_API_BASE = albyHubApiBase; - NWC_LND_ADDRESS = "${lndRpcAddress}:${lndRpcPort}"; - NWC_LND_CERT_FILE = lndCertPath; - NWC_LND_MACAROON_FILE = "/run/lnd/albyhub.macaroon"; - }; + systemd.services.nwc-lnurl.environment.NWC_ALBY_HUB_API_BASE = albyHubApiBase; + systemd.services.sovran-hub-web.environment = pythonManagerEnvironment; + environment.systemPackages = lib.mkBefore [ wrappedNwcWallet ]; sovran_systemsOS.domainRequirements = [ {