Matrix Server Leaf
cells/server/matrix.nix implements the Matrix homeserver role for the matrix branch.
Up: server leaves Down: Matrix options | matrix branch
What this leaf does
It reads my.matrix, enables Synapse when requested, configures a local listener, sets nginx as the TLS reverse proxy, configures ACME, and optionally enables mautrix bridges.
lib.mkIf cfg.enable {
services.matrix-synapse = {
enable = true;
settings = {
server_name = cfg.domain;
public_baseurl = "https://${cfg.domain}/";
};
};
services.nginx.virtualHosts.${cfg.domain} = {
enableACME = true;
forceSSL = true;
};
}Why it belongs to matrix
Matrix is an optional service role. A host can select server without selecting matrix, and a Matrix host can keep its service-specific options under my.matrix.
Privacy note
Use placeholder domains in public notes. Bridge credentials, tokens, and production hostnames should stay in private deployment docs or encrypted secrets.