2024-01-25 17:08:47 +01:00
|
|
|
_:
|
2023-12-18 23:16:07 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
retired_host = "retired.dgnum.eu";
|
|
|
|
|
2023-12-21 15:08:12 +01:00
|
|
|
mkRetired = hosts:
|
|
|
|
builtins.listToAttrs (builtins.map (name: {
|
|
|
|
inherit name;
|
|
|
|
value.to = retired_host;
|
|
|
|
}) hosts);
|
|
|
|
|
|
|
|
mkSub = domain: builtins.map (s: "${s}.${domain}");
|
2023-12-21 15:11:33 +01:00
|
|
|
mkSubs = attrs:
|
|
|
|
builtins.concatLists (builtins.attrValues (builtins.mapAttrs mkSub attrs));
|
2023-12-21 15:08:12 +01:00
|
|
|
|
2023-12-18 23:16:07 +01:00
|
|
|
redirections = {
|
2023-12-21 15:08:12 +01:00
|
|
|
"calendrier.eleves.ens.fr".to = "calendrier.dgnum.eu";
|
2024-01-23 14:38:20 +01:00
|
|
|
"docs.beta.rz.ens.wtf".to = "pads.dgnum.eu";
|
2023-12-21 15:08:12 +01:00
|
|
|
"git.rz.ens.wtf".to = "git.dgnum.eu";
|
2024-01-23 14:38:20 +01:00
|
|
|
"notion.rz.ens.wtf".to = "docs.dgnum.eu";
|
|
|
|
"nuage.beta.rz.ens.wtf".to = "cloud.dgnum.eu";
|
|
|
|
"rdv.dgnum.eu".to = "meet.dgnum.eu";
|
2023-12-21 15:08:12 +01:00
|
|
|
} // (mkRetired retired);
|
2023-12-18 23:16:07 +01:00
|
|
|
|
2023-12-21 15:11:33 +01:00
|
|
|
retired = mkSubs {
|
|
|
|
"ens.fr" = [ "alevins" "www.climatenavigator" ];
|
2023-12-22 06:56:25 +01:00
|
|
|
"ens.wtf" = [ "photos" ];
|
2023-12-21 15:11:33 +01:00
|
|
|
"rz.ens.wtf" = [ "s3" "cdn" ];
|
|
|
|
"beta.rz.ens.wtf" = [
|
2023-12-21 15:08:12 +01:00
|
|
|
"todo"
|
|
|
|
"minecraft"
|
|
|
|
"factorio"
|
|
|
|
"home"
|
|
|
|
"pads"
|
|
|
|
"api.pads"
|
|
|
|
"files.pads"
|
|
|
|
"sandbox.pads"
|
|
|
|
"jurisprudens"
|
|
|
|
"rstudio"
|
2023-12-21 15:11:33 +01:00
|
|
|
];
|
|
|
|
};
|
2023-12-18 23:16:07 +01:00
|
|
|
|
|
|
|
in {
|
|
|
|
services.nginx.virtualHosts = {
|
2024-01-25 17:08:47 +01:00
|
|
|
${retired_host}.default = true;
|
2023-12-19 18:38:57 +01:00
|
|
|
} // (builtins.mapAttrs (host:
|
2023-12-21 15:08:12 +01:00
|
|
|
{ to, ssl ? true }: {
|
2023-12-19 18:38:57 +01:00
|
|
|
globalRedirect = to;
|
|
|
|
enableACME = ssl;
|
|
|
|
forceSSL = ssl;
|
|
|
|
}) redirections);
|
2023-12-18 23:16:07 +01:00
|
|
|
}
|