fix: mautrix bridges
This commit is contained in:
parent
8d65b28de2
commit
7882b04089
2 changed files with 45 additions and 3 deletions
|
|
@ -2,6 +2,15 @@
|
|||
let
|
||||
domain = config.networking.domain;
|
||||
dataDir = "/var/www/${domain}";
|
||||
# Matrix well-known for homeserver and auth issuer discovery
|
||||
matrixClientConfig = {
|
||||
"m.homeserver".base_url = "https://matrix.cloonar.com";
|
||||
"org.matrix.msc2965.authentication" = {
|
||||
issuer = "https://matrix.cloonar.com/";
|
||||
account = "https://matrix.cloonar.com/account";
|
||||
};
|
||||
};
|
||||
matrixServerConfig."m.server" = "matrix.cloonar.com:443";
|
||||
in {
|
||||
|
||||
services.webstack.instances."${domain}" = {
|
||||
|
|
@ -15,6 +24,18 @@ in {
|
|||
index index.html;
|
||||
'';
|
||||
|
||||
# Matrix well-known endpoints for server/client discovery
|
||||
locations."= /.well-known/matrix/server".extraConfig = ''
|
||||
default_type application/json;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
return 200 '${builtins.toJSON matrixServerConfig}';
|
||||
'';
|
||||
locations."= /.well-known/matrix/client".extraConfig = ''
|
||||
default_type application/json;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
return 200 '${builtins.toJSON matrixClientConfig}';
|
||||
'';
|
||||
|
||||
locations."~* \.(jpe?g|png)$".extraConfig = ''
|
||||
set $img_format Z;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue