matrix wip

This commit is contained in:
Ingolf Wagner 2024-04-04 10:44:34 +02:00
parent 02b28f485a
commit 0e252ec2fd
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -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