Merge pull request #17 from naturallaw777/copilot/fix-matrix-modal-credentials-structure

Fix Matrix-Synapse credentials modal: replace multiline blob with individual credential rows
This commit is contained in:
Sovran_Systems
2026-04-03 11:15:05 -05:00
committed by GitHub
2 changed files with 22 additions and 1 deletions

View File

@@ -61,7 +61,11 @@ let
# ── Communication ──────────────────────────────────────────
++ [
{ name = "Matrix-Synapse"; unit = "matrix-synapse.service"; type = "system"; icon = "synapse"; enabled = cfg.services.synapse; category = "communication"; credentials = [
{ label = "Users"; file = "/var/lib/secrets/matrix-users"; multiline = true; }
{ label = "Homeserver URL"; file = "/var/lib/secrets/matrix-homeserver-url"; }
{ label = "Admin Username"; file = "/var/lib/secrets/matrix-admin-username"; }
{ label = "Admin Password"; file = "/var/lib/secrets/matrix-admin-password"; }
{ label = "Test Username"; file = "/var/lib/secrets/matrix-test-username"; }
{ label = "Test Password"; file = "/var/lib/secrets/matrix-test-password"; }
]; }
{ name = "Element-Call"; unit = "livekit.service"; type = "system"; icon = "livekit"; enabled = cfg.features.element-calling; category = "communication"; credentials = []; }
]

View File

@@ -226,6 +226,23 @@ CREDS
fi
chmod 600 "$CREDS_FILE"
# Write individual credential files for the hub UI (umask 077 ensures 600 from creation)
PREEXISTING_NOTE="Password set during original setup"
(umask 077; echo "https://$DOMAIN" > /var/lib/secrets/matrix-homeserver-url)
(umask 077; echo "@$ADMIN_USER:$DOMAIN" > /var/lib/secrets/matrix-admin-username)
if [ "$ADMIN_CREATED" = true ]; then
(umask 077; echo "$ADMIN_PASS" > /var/lib/secrets/matrix-admin-password)
else
(umask 077; echo "$PREEXISTING_NOTE" > /var/lib/secrets/matrix-admin-password)
fi
(umask 077; echo "@$TEST_USER:$DOMAIN" > /var/lib/secrets/matrix-test-username)
if [ "$TEST_CREATED" = true ]; then
(umask 077; echo "$TEST_PASS" > /var/lib/secrets/matrix-test-password)
else
(umask 077; echo "$PREEXISTING_NOTE" > /var/lib/secrets/matrix-test-password)
fi
echo "Matrix users setup completed."
fi
'';