1
0
Fork 0
nixos-config/nixos/roles/mathechor.de.nix
Malte Brandy 57123b08e1 Reformat
2022-03-08 02:42:46 +01:00

44 lines
1.1 KiB
Nix

{
config,
pkgs,
lib,
...
}: {
services = {
nginx = {
enable = true;
virtualHosts."mathechor.de" = {
serverAliases = ["www.mathechor.de"];
forceSSL = true;
enableACME = true;
locations = {
"/" = {
root = "/var/www/mathechor/public";
index = "index.html";
extraConfig = "location ~* .(otf)$ {add_header Access-Control-Allow-Origin *;}";
};
};
};
virtualHosts."intern.mathechor.de" = {
forceSSL = true;
enableACME = true;
basicAuthFile = pkgs.privateFile "basic-auth/mathechor.de";
locations = {
"/" = {
root = "/var/www/mathechor/intern";
index = "index.html";
};
"/mathechor.ics" = {
proxyPass = pkgs.privateValue "" "mathechor-ics";
extraConfig = ''
proxy_ssl_name cloud.mathechor.de;
proxy_ssl_server_name on;
set $args export;
'';
};
};
};
};
};
}