40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
|
{ pkgs, config, ... }:
|
||
|
{
|
||
|
services.nginx.virtualHosts = {
|
||
|
"${config.secrets.jimDomain}" = {
|
||
|
enableACME = true;
|
||
|
addSSL = true;
|
||
|
root = "/var/www/Jimbo-Landing-Page";
|
||
|
locations = {
|
||
|
"/.well-known/matrix/client" = {
|
||
|
extraConfig = ''
|
||
|
default_type application/json;
|
||
|
return 200 '
|
||
|
{
|
||
|
"m.homeserver": {
|
||
|
"base_url": "https://matrix.${config.secrets.jimDomain}"
|
||
|
},
|
||
|
"m.identity_server": {
|
||
|
"base_url": "https://matrix.org"
|
||
|
},
|
||
|
"org.matrix.msc3575.proxy": {
|
||
|
"url": "https://matrix.${config.secrets.jimDomain}"
|
||
|
}
|
||
|
}';
|
||
|
'';
|
||
|
};
|
||
|
"/.well-known/matrix/server" = {
|
||
|
extraConfig = ''
|
||
|
default_type application/json;
|
||
|
return 200 '{"m.server": "matrix.${config.secrets.jimDomain}:443"}';
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
systemd.services.nginx.serviceConfig = {
|
||
|
ReadWritePaths = [ "/var/www/Jimbo-Landing-Page/streams/hls/" ];
|
||
|
};
|
||
|
}
|