From 09b34997e4d578dca69bd3b09e8b701ee682287b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Aug 2026 03:41:41 +0000 Subject: [PATCH] Fix Matrix SIGPIPE and RTL v0.15.8 config schema regressions - modules/synapse.nix: replace tr|head pipeline (causes SIGPIPE under set -euo pipefail) with pwgen -sA0 20 1 which is already in PATH - modules/bitcoin/rtl.nix: lowercase Authentication->authentication and Settings->settings per RTL v0.15.8 schema; add lnServerUrl pointing to LND REST endpoint; move swapServerUrl/boltzServerUrl inside settings; apply same fixes to CLN branch Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- modules/bitcoin/rtl.nix | 14 +++++++------- modules/synapse.nix | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/bitcoin/rtl.nix b/modules/bitcoin/rtl.nix index 1979c8d..40096f7 100644 --- a/modules/bitcoin/rtl.nix +++ b/modules/bitcoin/rtl.nix @@ -101,33 +101,33 @@ let index = 1; lnNode = "lnd"; lnImplementation = "LND"; - Authentication = { + authentication = { macaroonPath = "${cfg.dataDir}/macaroons"; swapMacaroonPath = if cfg.nodes.lnd.loop then "${cfg.dataDir}/loop-macaroons" else ""; boltzMacaroonPath = ""; }; - Settings = { + settings = { userPersona = "OPERATOR"; themeMode = if cfg.nightTheme then "NIGHT" else "DAY"; themeColor = "PURPLE"; channelBackupPath = "${cfg.dataDir}/backup"; logLevel = "INFO"; + lnServerUrl = "https://${lnd.restAddress}:${toString lnd.restPort}"; + swapServerUrl = if cfg.nodes.lnd.loop then "https://127.0.0.1:8081" else ""; + boltzServerUrl = ""; fiatConversion = cfg.extraCurrency != null; unannouncedChannels = true; } // optionalAttrs (cfg.extraCurrency != null) { currencyUnit = cfg.extraCurrency; }; - } // optionalAttrs cfg.nodes.lnd.loop { - swapServerUrl = "https://localhost:8081"; - boltzServerUrl = ""; }) ++ optional cfg.nodes.clightning.enable { index = 2; lnNode = "clightning"; lnImplementation = "CLN"; - Authentication = { + authentication = { runePath = runePath; }; - Settings = { + settings = { userPersona = "OPERATOR"; themeMode = if cfg.nightTheme then "NIGHT" else "DAY"; themeColor = "PURPLE"; diff --git a/modules/synapse.nix b/modules/synapse.nix index 9fe7fa1..823aed7 100755 --- a/modules/synapse.nix +++ b/modules/synapse.nix @@ -237,7 +237,7 @@ CREDS # idempotent without exposing this service credential in the Hub UI. HUB_ADMIN_CREDS="/var/lib/secrets/matrix-hub-admin" if [ ! -s "$HUB_ADMIN_CREDS" ]; then - HUB_ADMIN_USER="sovran-hub-$(tr -dc 'a-z0-9' < /dev/urandom | head -c 20)" + HUB_ADMIN_USER="sovran-hub-$(pwgen -sA0 20 1)" HUB_ADMIN_PASS=$(pwgen -s 32 1) if register_new_matrix_user -c /run/matrix-synapse/runtime-config.yaml \ -u "$HUB_ADMIN_USER" -p "$HUB_ADMIN_PASS" -a http://localhost:8008; then