Merge pull request 'fix/add-matrix-wellknown' (#52) from fix/add-matrix-wellknown into main
Some checks failed
Flake checks / Check (push) Failing after 13s

Reviewed-on: #52
Reviewed-by: teutat3s <teutat3s@noreply.git.pub.solar>
This commit is contained in:
b12f 2023-11-08 15:33:21 +00:00
commit fda21f8633
Signed by: pub.solar gitea
GPG key ID: F0332B04B7054873

View file

@ -6,8 +6,25 @@ let
add_header X-XSS-Protection "1; mode=block"; add_header X-XSS-Protection "1; mode=block";
''; '';
clientConfig = import ./matrix/element-client-config.nix; clientConfig = import ./matrix/element-client-config.nix;
wellKnownClient."m.homeserver".base_url = "https://matrix.test.pub.solar"; wellKnownClient = {
wellKnownServer."m.server" = "matrix.test.pub.solar:8448"; "m.homeserver".base_url = "https://matrix.pub.solar";
"m.identity_server".base_url = "https://matrix.pub.solar";
"im.vector.riot.e2ee".default = true;
"io.element.e2ee" = {
default = true;
secure_backup_required = false;
secure_backup_setup_methods = [];
};
"m.integrations" = {
managers = [
{
api_url = "https://dimension.pub.solar/api/v1/scalar";
ui_url = "https://dimension.pub.solar/element";
}
];
};
};
wellKnownServer."m.server" = "matrix.pub.solar:8448";
mkWellKnown = data: '' mkWellKnown = data: ''
add_header Content-Type application/json; add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Origin *;
@ -20,15 +37,19 @@ let
in in
{ {
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"test.pub.solar" = {
root = "/dev/null";
forceSSL = lib.mkDefault true; #####################################
enableACME = lib.mkDefault true; # This is already in production use #
#####################################
"pub.solar" = {
locations = wellKnownLocations; locations = wellKnownLocations;
}; };
#######################################
# Stuff below is still in betatesting #
#######################################
"chat.test.pub.solar" = { "chat.test.pub.solar" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;