fix(nwc-wallets): replace incorrect lib.mkIf usage with plain if expressions

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
This commit is contained in:
naturallaw777
2026-07-29 02:58:33 +00:00
co-authored by arena-agent
parent 037a3a00af
commit 1e4a988ca2
+8 -6
View File
@@ -19,9 +19,10 @@ let
NWC_LND_ADDRESS = "${lndRpcAddress}:${lndRpcPort}"; NWC_LND_ADDRESS = "${lndRpcAddress}:${lndRpcPort}";
NWC_LND_CERT_FILE = lndCertPath; NWC_LND_CERT_FILE = lndCertPath;
NWC_LND_MACAROON_FILE = "/run/lnd/albyhub.macaroon"; NWC_LND_MACAROON_FILE = "/run/lnd/albyhub.macaroon";
NWC_RELAY = lib.mkIf config.sovran_systemsOS.features.haven NWC_RELAY =
"wss://haven.${config.networking.domain}/nostr" if config.sovran_systemsOS.features.haven
"wss://relay.getalby.com,wss://relay2.getalby.com"; then "wss://haven.${config.networking.domain}/nostr"
else "wss://relay.getalby.com,wss://relay2.getalby.com";
}; };
wrappedNwcWallet = lib.hiPrio (pkgs.writeShellScriptBin "nwc-wallet" '' wrappedNwcWallet = lib.hiPrio (pkgs.writeShellScriptBin "nwc-wallet" ''
export NWC_ALBY_HUB_API_BASE='${pythonManagerEnvironment.NWC_ALBY_HUB_API_BASE}' export NWC_ALBY_HUB_API_BASE='${pythonManagerEnvironment.NWC_ALBY_HUB_API_BASE}'
@@ -113,9 +114,10 @@ lib.mkIf config.sovran_systemsOS.features."nwc-wallets" {
DATABASE_URI = "/var/lib/albyhub/nwc.db"; DATABASE_URI = "/var/lib/albyhub/nwc.db";
PORT = toString albyHubPort; PORT = toString albyHubPort;
# Use private Nostr relay if Haven is enabled, otherwise default to Alby's public relays # Use private Nostr relay if Haven is enabled, otherwise default to Alby's public relays
RELAY = lib.mkIf config.sovran_systemsOS.features.haven RELAY =
"wss://haven.${config.networking.domain}/nostr" if config.sovran_systemsOS.features.haven
"wss://relay.getalby.com,wss://relay2.getalby.com"; then "wss://haven.${config.networking.domain}/nostr"
else "wss://relay.getalby.com,wss://relay2.getalby.com";
AUTO_LINK_ALBY_ACCOUNT = "false"; AUTO_LINK_ALBY_ACCOUNT = "false";
SEND_EVENTS_TO_ALBY = "false"; SEND_EVENTS_TO_ALBY = "false";
LOG_TO_FILE = "false"; LOG_TO_FILE = "false";