2021-11-13 02:51:54 +01:00
|
|
|
{ ... }:
|
2022-03-05 23:16:54 +01:00
|
|
|
let
|
|
|
|
mkCloudLocation = { from, cloudHost }: {
|
|
|
|
name = "/cal/${from}";
|
|
|
|
value = {
|
|
|
|
extraConfig = ''
|
|
|
|
proxy_pass https://${cloudHost}/remote.php/dav/public-calendars/;
|
|
|
|
proxy_set_header Host ${cloudHost};
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
clouds = [
|
|
|
|
{ from = "klub-reseau"; cloudHost = "nuage.beta.rz.ens.wtf"; }
|
|
|
|
{ from = "eleves-ens"; cloudHost = "cloud.eleves.ens.fr"; }
|
2022-03-29 23:04:17 +02:00
|
|
|
{ from = "frama-agenda"; cloudHost = "framagenda.org"; }
|
2022-03-05 23:16:54 +01:00
|
|
|
];
|
|
|
|
in
|
2021-11-13 02:51:54 +01:00
|
|
|
{
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
|
2022-03-05 23:16:54 +01:00
|
|
|
resolver = {
|
|
|
|
addresses = [ "1.1.1.1" ];
|
|
|
|
};
|
|
|
|
|
2021-11-13 02:51:54 +01:00
|
|
|
recommendedGzipSettings = true;
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
|
|
|
|
virtualHosts = {
|
|
|
|
"home.beta.rz.ens.wtf" = {
|
|
|
|
serverAliases = [ "beta.rz.ens.wtf" ];
|
2021-11-14 23:57:19 +01:00
|
|
|
default = true;
|
2021-11-13 02:51:54 +01:00
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
root = "/var/public-cof/home";
|
2022-03-05 23:16:54 +01:00
|
|
|
locations = builtins.listToAttrs (map mkCloudLocation clouds);
|
2021-11-13 02:51:54 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
|
|
}
|