feat(matrix): Synapse + MAS on jupiter, published by neptun

Homeserver for mgaction.town (@user:mgaction.town). Synapse and the
Matrix Authentication Service share jupiter's postgres; logins are
OIDC-only through Authentik via MAS, since Element X can't use
Synapse's own SSO. neptun serves the apex .well-known delegation plus
matrix. and account. vhosts; the admin API stays tailnet-only.

Synapse's signing key is a sops secret so the federation identity
survives losing the RAID0 array. Covered by checks.matrix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 13:04:52 +02:00
co-authored by Claude Opus 5.5
parent 2719ed7707
commit 7a68716c1c
10 changed files with 461 additions and 3 deletions
+1
View File
@@ -26,6 +26,7 @@
../../services/dev/gitea.nix
../../services/dev/gitea-mcp.nix
../../services/dev/obsidian-livesync.nix
../../services/comms/matrix.nix
];
# sabnzbd's unrar dependency is unfree; scope the allowance to just that
+22
View File
@@ -55,6 +55,28 @@
sops.secrets.sabnzbd_eweka_username.owner = "sabnzbd";
sops.secrets.sabnzbd_eweka_password.owner = "sabnzbd";
# Matrix (services/comms/matrix.nix). The synapse signing key lives here rather than
# being generated on first start, so losing the RAID0 array doesn't lose the
# server's federation identity. mas_shared_secret is read by synapse and MAS
# (MAS is in group matrix-synapse). matrix_oidc_client_secret is the Authentik
# `matrix` provider's.
sops.secrets.synapse_signing_key.owner = "matrix-synapse";
sops.secrets.synapse_macaroon_secret_key.owner = "matrix-synapse";
sops.secrets.synapse_form_secret.owner = "matrix-synapse";
sops.secrets.mas_shared_secret = { owner = "matrix-synapse"; group = "matrix-synapse"; mode = "0440"; };
sops.secrets.mas_encryption_secret.owner = "matrix-authentication-service";
sops.secrets.mas_signing_key.owner = "matrix-authentication-service";
sops.secrets.matrix_oidc_client_secret.owner = "matrix-authentication-service";
homelab.matrix = {
signingKeyFile = config.sops.secrets.synapse_signing_key.path;
macaroonSecretFile = config.sops.secrets.synapse_macaroon_secret_key.path;
formSecretFile = config.sops.secrets.synapse_form_secret.path;
masSecretFile = config.sops.secrets.mas_shared_secret.path;
masEncryptionFile = config.sops.secrets.mas_encryption_secret.path;
masSigningKeyFile = config.sops.secrets.mas_signing_key.path;
oidcClientSecretFile = config.sops.secrets.matrix_oidc_client_secret.path;
};
# CouchDB admin account for Obsidian LiveSync — rendered into an [admins] ini
# fragment instead of services.couchdb.adminPass, which would put the plaintext in
# the world-readable store.