matrix wip

This commit is contained in:
Ingolf Wagner 2024-04-04 10:44:34 +02:00
parent 02b28f485a
commit 0e252ec2fd
Signed by: palo
GPG key ID: 76BF5F1928B9618B

View file

@ -7,6 +7,7 @@ let
domain = "ingolf-wagner.de"; domain = "ingolf-wagner.de";
baseUrl = "https://matrix.${domain}"; baseUrl = "https://matrix.${domain}";
matrix_create_user = pkgs.writers.writeBashBin "matrix-create-user" '' matrix_create_user = pkgs.writers.writeBashBin "matrix-create-user" ''
${pkgs.matrix-synapse}/bin/register_new_matrix_user \ ${pkgs.matrix-synapse}/bin/register_new_matrix_user \
-k $( ${pkgs.gojq}/bin/gojq \ -k $( ${pkgs.gojq}/bin/gojq \
@ -95,10 +96,6 @@ in
type = "http"; type = "http";
tls = false; tls = false;
x_forwarded = true; x_forwarded = true;
#resources = [{
# names = [ "client" "federation" ];
# compress = true;
#}];
resources = [ resources = [
{ {
names = [ "client" ]; names = [ "client" ];
@ -132,21 +129,20 @@ in
# This pattern also allows to seamlessly move the homeserver from # This pattern also allows to seamlessly move the homeserver from
# myhostname.example.org to myotherhost.example.org by only changing the # myhostname.example.org to myotherhost.example.org by only changing the
# /.well-known redirection target. # /.well-known redirection target.
"${domain}" = {
#"${domain}" = { enableACME = true;
# enableACME = true; forceSSL = true;
# forceSSL = true; # This section is not needed if the server_name of matrix-synapse is equal to
# # 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
# # the domain (i.e. example.org from @foo:example.org) and the federation port # is 8448.
# # is 8448. # Further reference can be found in the docs about delegation under
# # Further reference can be found in the docs about delegation under # https://element-hq.github.io/synapse/latest/delegate.html
# # https://element-hq.github.io/synapse/latest/delegate.html locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
# locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig; # This is usually needed for homeserver discovery (from e.g. other Matrix clients).
# # This is usually needed for homeserver discovery (from e.g. other Matrix clients). # Further reference can be found in the upstream docs at
# # Further reference can be found in the upstream docs at # https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient
# # https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
# locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig; };
#};
"matrix.${domain}" = { "matrix.${domain}" = {
listen = [ listen = [
@ -166,6 +162,7 @@ in
ssl = true; ssl = true;
} }
]; ];
serverAliases = [ "ingolf-wagner.de" ];
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
# It's also possible to do a redirect here or something else, this vhost is not # It's also possible to do a redirect here or something else, this vhost is not