1
0
Fork 0
nixos-config/nixos/roles/mathechor.de.nix

44 lines
1.1 KiB
Nix
Raw Normal View History

2020-09-30 23:30:40 +00:00
{
2022-03-08 01:42:46 +00:00
config,
pkgs,
lib,
...
}: {
2019-08-07 21:40:26 +00:00
services = {
nginx = {
enable = true;
virtualHosts."mathechor.de" = {
2022-03-08 01:42:46 +00:00
serverAliases = ["www.mathechor.de"];
2019-08-07 21:40:26 +00:00
forceSSL = true;
enableACME = true;
locations = {
"/" = {
root = "/var/www/mathechor/public";
index = "index.html";
2022-03-08 01:42:46 +00:00
extraConfig = "location ~* .(otf)$ {add_header Access-Control-Allow-Origin *;}";
2019-08-07 21:40:26 +00:00
};
};
};
virtualHosts."intern.mathechor.de" = {
forceSSL = true;
enableACME = true;
basicAuthFile = pkgs.privateFile "basic-auth/mathechor.de";
2019-08-07 21:40:26 +00:00
locations = {
"/" = {
root = "/var/www/mathechor/intern";
index = "index.html";
};
"/mathechor.ics" = {
2020-09-30 23:30:40 +00:00
proxyPass = pkgs.privateValue "" "mathechor-ics";
2019-08-07 21:40:26 +00:00
extraConfig = ''
proxy_ssl_name cloud.mathechor.de;
proxy_ssl_server_name on;
2021-11-08 22:12:05 +00:00
set $args export;
2019-08-07 21:40:26 +00:00
'';
};
};
};
};
};
}