2023-12-18 23:16:07 +01:00
|
|
|
{ sources, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
retired_host = "retired.dgnum.eu";
|
|
|
|
|
|
|
|
redirections = {
|
2023-12-19 18:38:57 +01:00
|
|
|
"nuage.beta.rz.ens.wtf".to = "cloud.dgnum.eu";
|
|
|
|
"notion.rz.ens.wtf".to = "docs.dgnum.eu";
|
|
|
|
"docs.beta.rz.ens.wtf".to = "pads.dgnum.eu";
|
|
|
|
"calendrier.eleves.ens.fr" = {
|
|
|
|
to = "calendrier.dgnum.eu";
|
|
|
|
ssl = true;
|
|
|
|
};
|
2023-12-18 23:16:07 +01:00
|
|
|
} // (builtins.listToAttrs (builtins.map (name: {
|
|
|
|
inherit name;
|
2023-12-19 18:38:57 +01:00
|
|
|
value.to = retired_host;
|
2023-12-18 23:16:07 +01:00
|
|
|
}) retired));
|
|
|
|
|
2023-12-20 13:16:15 +01:00
|
|
|
retired = [
|
|
|
|
"auth.rz.ens.wtf"
|
|
|
|
"photos.ens.wtf"
|
|
|
|
"alevins.ens.fr"
|
|
|
|
"www.climatenavigator.ens.fr"
|
|
|
|
];
|
2023-12-18 23:16:07 +01:00
|
|
|
|
|
|
|
in {
|
|
|
|
services.nginx.virtualHosts = {
|
2023-12-18 23:39:40 +01:00
|
|
|
${retired_host} = {
|
2023-12-18 23:16:07 +01:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
|
|
|
|
root = "${sources.dgnum-retired.outPath}/www";
|
|
|
|
};
|
2023-12-19 18:38:57 +01:00
|
|
|
} // (builtins.mapAttrs (host:
|
|
|
|
{ to, ssl ? false }: {
|
|
|
|
globalRedirect = to;
|
|
|
|
enableACME = ssl;
|
|
|
|
forceSSL = ssl;
|
|
|
|
}) redirections);
|
2023-12-18 23:16:07 +01:00
|
|
|
}
|