From 7aed3e09e8f1a30335a3f03bcfd7a72d693d094d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 14:51:00 +0000 Subject: [PATCH 1/2] Initial plan From 6c433d642d9dc1dab65c3e4253f03a7ed3c257f6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 14:52:40 +0000 Subject: [PATCH 2/2] Add zeus-connect-setup service and timer to wallet-autoconnect.nix Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/6b3d9c59-40e1-45c1-93f9-a5ba6547567b Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- modules/wallet-autoconnect.nix | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/modules/wallet-autoconnect.nix b/modules/wallet-autoconnect.nix index 688e9c0..0993e8f 100644 --- a/modules/wallet-autoconnect.nix +++ b/modules/wallet-autoconnect.nix @@ -80,4 +80,45 @@ EOF ''; }; + # ── Zeus Connect (lndconnect URL for mobile wallet) ────────── + systemd.services.zeus-connect-setup = { + description = "Save Zeus lndconnect URL"; + wantedBy = [ "multi-user.target" ]; + after = [ "lnd.service" ]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + }; + path = [ pkgs.coreutils "/run/current-system/sw" ]; + script = '' + SECRET_FILE="/var/lib/secrets/zeus-connect-url" + mkdir -p /var/lib/secrets + + URL="" + if command -v lndconnect >/dev/null 2>&1; then + URL=$(lndconnect --url 2>/dev/null || true) + elif command -v lnconnect-clnrest >/dev/null 2>&1; then + URL=$(lnconnect-clnrest --url 2>/dev/null || true) + fi + + if [ -n "$URL" ]; then + echo "$URL" > "$SECRET_FILE" + chmod 600 "$SECRET_FILE" + echo "Zeus connect URL saved." + else + echo "No lndconnect URL available yet." + fi + ''; + }; + + # ── Refresh Zeus URL periodically (certs/macaroons may rotate) + systemd.timers.zeus-connect-setup = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "2min"; + OnUnitActiveSec = "30min"; + Unit = "zeus-connect-setup.service"; + }; + }; + }