···2727{ pkgs, lib, config, ... }:
2828let
2929 fqdn = "${config.networking.hostName}.${config.networking.domain}";
3030- clientConfig."m.homeserver".base_url = "https://${fqdn}";
3030+ baseUrl = "https://${fqdn}";
3131+ clientConfig."m.homeserver".base_url = baseUrl;
3132 serverConfig."m.server" = "${fqdn}:443";
3233 mkWellKnown = data: ''
3334 add_header Content-Type application/json;
···9798 services.matrix-synapse = {
9899 enable = true;
99100 settings.server_name = config.networking.domain;
101101+ # The public base URL value must match the `base_url` value set in `clientConfig` above.
102102+ # The default value here is based on `server_name`, so if your `server_name` is different
103103+ # from the value of `fqdn` above, you will likely run into some mismatched domain names
104104+ # in client applications.
105105+ settings.public_baseurl = baseUrl;
100106 settings.listeners = [
101107 { port = 8008;
102108 bind_addresses = [ "::1" ];