Add initial dingserver config

This commit is contained in:
2022-01-14 18:47:54 +00:00
parent 500b5608e9
commit 432f7fe39d
5 changed files with 186 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
{ pkgs, lib, ... }:
{
services.caddy = {
enable = true;
virtualHosts = {
"matrix.broccoli.town" = {
extraConfig = ''
reverse_proxy /_matrix/* http://localhost:8008
reverse_proxy /_synapse/client/* http://localhost:8008
'';
};
"broccoli.town:8448" = {
extraConfig = ''
reverse_proxy http://localhost:8008
'';
};
"chat.broccoli.town" = {
extraConfig = ''
header {
X-Frame-Options "SAMEORIGIN"
X-XSS-Protection "1; mode=block"
X-Content-Type-Options "nosniff"
X-Robots-Tag "noindex, noarchive, nofollow"
}
root * ${pkgs.element-web.override {
conf = {
default_server_config."m.homeserver" = {
"base_url" = "https://matrix.broccoli.town";
"server_name" = "matrix.broccoli.town";
};
};
}
}
file_server
'';
};
"danielpatterson.dev" = {
extraConfig = ''
root * /srv/site/danielpatterson.dev
file_server
'';
};
};
};
}