diff --git a/roles/matrix.nix b/roles/matrix.nix index 1511149..d556860 100644 --- a/roles/matrix.nix +++ b/roles/matrix.nix @@ -8,11 +8,11 @@ matrix-synapse = { enable = true; # Enable the synapse server - server_name = "chat.mcwhirter.io"; # Server's public domain name - public_baseurl = "https://chat.mcwhirter.io/"; # services.matrix-synapse.public_baseurl + server_name = "mcwhirter.io"; # Server's public domain name + public_baseurl = "https://mcwhirter.io:443/"; # Matrix target URL web_client = true; # Whether to serve a web client create_local_database = true; # Whether to create a local database - enable_registration = false; # Toggle user registration + enable_registration = true; # Toggle user registration listeners = [ { bind_address = "::1"; # Listen on localhost only port = 8008; # Port to listen on @@ -28,8 +28,8 @@ type = "http"; x_forwarded = true; } ]; - tls_certificate_path = "/var/lib/acme/chat.mcwhirter.io/fullchain.pem"; - tls_private_key_path = "/var/lib/acme/chat.mcwhirter.io/key.pem"; + tls_certificate_path = "/var/lib/acme/mcwhirter.io/fullchain.pem"; + tls_private_key_path = "/var/lib/acme/mcwhirter.io/key.pem"; }; nginx = { @@ -39,7 +39,7 @@ recommendedGzipSettings = true; recommendedProxySettings = true; virtualHosts = { - "chat.mcwhirter.io" = { + "mcwhirter.io" = { forceSSL = true; enableACME = true; serverAliases = [ @@ -54,7 +54,7 @@ let # use 443 instead of the default 8448 port to unite # the client-server and server-server port for simplicity - server = { "m.server" = "chat.mcwhirter.io:443"; }; + server = { "m.server" = "mcwhirter.io:443"; }; in '' add_header Content-Type application/json; return 200 '${builtins.toJSON server}'; @@ -62,7 +62,7 @@ "= /.well-known/matrix/client".extraConfig = let client = { - "m.homeserver" = { "base_url" = "https://chat.mcwhirter.io"; }; + "m.homeserver" = { "base_url" = "https://mcwhirter.io"; }; "m.identity_server" = { "base_url" = "https://vector.im"; }; }; # ACAO required to allow riot-web on any URL to request this json file @@ -78,7 +78,7 @@ }; security.acme.certs = { - "chat.mcwhirter.io" = { + "mcwhirter.io" = { group = "matrix-synapse"; allowKeysForGroup = true; postRun = "systemctl reload nginx.service; systemctl restart matrix-synapse.service"; @@ -86,10 +86,6 @@ }; }; - environment.systemPackages = with pkgs; [ - riot-web # A glossy Matrix collaboration client for the web - ]; - networking.firewall = { enable = true; allowedTCPPorts = [