From 0e252ec2fd0ca0809521ec5a7c64ec99b63a08ff Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 4 Apr 2024 10:44:34 +0200 Subject: [PATCH] matrix wip --- nixos/machines/orbi/social-matrix.nix | 35 ++++++++++++--------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/nixos/machines/orbi/social-matrix.nix b/nixos/machines/orbi/social-matrix.nix index 7a794c5..78818b1 100644 --- a/nixos/machines/orbi/social-matrix.nix +++ b/nixos/machines/orbi/social-matrix.nix @@ -7,6 +7,7 @@ let domain = "ingolf-wagner.de"; baseUrl = "https://matrix.${domain}"; + matrix_create_user = pkgs.writers.writeBashBin "matrix-create-user" '' ${pkgs.matrix-synapse}/bin/register_new_matrix_user \ -k $( ${pkgs.gojq}/bin/gojq \ @@ -95,10 +96,6 @@ in type = "http"; tls = false; x_forwarded = true; - #resources = [{ - # names = [ "client" "federation" ]; - # compress = true; - #}]; resources = [ { names = [ "client" ]; @@ -132,21 +129,20 @@ in # This pattern also allows to seamlessly move the homeserver from # myhostname.example.org to myotherhost.example.org by only changing the # /.well-known redirection target. - - #"${domain}" = { - # enableACME = true; - # forceSSL = true; - # # This section is not needed if the server_name of matrix-synapse is equal to - # # the domain (i.e. example.org from @foo:example.org) and the federation port - # # is 8448. - # # Further reference can be found in the docs about delegation under - # # https://element-hq.github.io/synapse/latest/delegate.html - # locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig; - # # This is usually needed for homeserver discovery (from e.g. other Matrix clients). - # # Further reference can be found in the upstream docs at - # # https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient - # locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig; - #}; + "${domain}" = { + enableACME = true; + forceSSL = true; + # This section is not needed if the server_name of matrix-synapse is equal to + # the domain (i.e. example.org from @foo:example.org) and the federation port + # is 8448. + # Further reference can be found in the docs about delegation under + # https://element-hq.github.io/synapse/latest/delegate.html + locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig; + # This is usually needed for homeserver discovery (from e.g. other Matrix clients). + # Further reference can be found in the upstream docs at + # https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient + locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig; + }; "matrix.${domain}" = { listen = [ @@ -166,6 +162,7 @@ in ssl = true; } ]; + serverAliases = [ "ingolf-wagner.de" ]; enableACME = true; forceSSL = true; # It's also possible to do a redirect here or something else, this vhost is not