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 = {
|
2022-08-15 13:31:27 +02:00
|
|
|
# FIXME: factorize and remove it, it has been superseded by eleves.ens.fr/calendrier
|
|
|
|
# "home.beta.rz.ens.wtf" = {
|
|
|
|
# serverAliases = [ "beta.rz.ens.wtf" ];
|
|
|
|
# default = true;
|
|
|
|
# forceSSL = true;
|
|
|
|
# enableACME = true;
|
|
|
|
# root = "/var/public-cof/home";
|
|
|
|
# locations = builtins.listToAttrs (map mkCloudLocation clouds);
|
|
|
|
# };
|
2021-11-13 02:51:54 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
|
|
}
|