Fix matrix
This commit is contained in:
parent
872abb1522
commit
6a4fce5a37
6 changed files with 43 additions and 34 deletions
|
@ -1,6 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./p1
|
||||
./p2
|
||||
];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."${config.domains.p1}" = lib.mkIf config.system.server.enable {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
locations = {
|
||||
"/.well-known/matrix/client".extraConfig = ''
|
||||
default_type application/json;
|
||||
return 200 '
|
||||
{
|
||||
"m.homeserver": {
|
||||
"base_url": "https://matrix.${config.domains.p1}"
|
||||
},
|
||||
"m.identity_server": {
|
||||
"base_url": "https://matrix.org"
|
||||
}
|
||||
}
|
||||
';
|
||||
'';
|
||||
"/.well-known/matrix/server".extraConfig = ''
|
||||
default_type application/json;
|
||||
return 200 '{ "m.server": "matrix.${config.domains.p1}:443" }';
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -4,28 +4,5 @@
|
|||
enableACME = true;
|
||||
addSSL = true;
|
||||
root = "/var/www/landing-page";
|
||||
locations = {
|
||||
"/.well-known/matrix/client".extraConfig = ''
|
||||
default_type application/json;
|
||||
return 200 '
|
||||
{
|
||||
"m.homeserver": {
|
||||
"base_url": "https://matrix.${config.domains.p2}"
|
||||
},
|
||||
"m.identity_server": {
|
||||
"base_url": "https://matrix.org"
|
||||
},
|
||||
"org.matrix.msc3575.proxy": {
|
||||
"url": "https://matrix.${config.domains.p2}"
|
||||
}
|
||||
}
|
||||
';
|
||||
'';
|
||||
|
||||
"/.well-known/matrix/server".extraConfig = ''
|
||||
default_type application/json;
|
||||
return 200 '{ "m.server": "matrix.${config.domains.p2}:443" }';
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue