infrastructure/machines/web01/redirections.nix
Tom Hubrecht 3f928ce90b
All checks were successful
build configuration / build_web02 (push) Successful in 1m2s
build configuration / build_vault01 (push) Successful in 1m6s
build configuration / build_storage01 (push) Successful in 1m6s
build configuration / build_compute01 (push) Successful in 1m11s
lint / check (push) Successful in 24s
build configuration / build_web01 (push) Successful in 1m30s
build configuration / build_rescue01 (push) Successful in 56s
build configuration / push_to_cache (push) Successful in 2m13s
feat(modules): Generalize redirections
2024-04-23 22:02:04 +02:00

60 lines
1.2 KiB
Nix

_:
let
retiredHost = "retired.dgnum.eu";
mkSubs =
attrs:
builtins.concatLists (
builtins.attrValues (builtins.mapAttrs (domain: builtins.map (s: "${s}.${domain}")) attrs)
);
in
{
dgn-redirections = {
inherit retiredHost;
redirections = {
"calendrier.eleves.ens.fr" = "calendrier.dgnum.eu";
"docs.beta.rz.ens.wtf" = "pads.dgnum.eu";
"git.rz.ens.wtf" = "git.dgnum.eu";
"notion.rz.ens.wtf" = "docs.dgnum.eu";
"nuage.beta.rz.ens.wtf" = "cloud.dgnum.eu";
"rdv.dgnum.eu" = "meet.dgnum.eu";
"www.bda.ens.fr" = "bda.ens.fr";
"bda.wp.dgnum.eu" = "bda.ens.fr";
"www.tuteurs.ens.fr" = "tuteurs.ens.fr";
"www.interq.ens.fr" = "interq.ens.fr";
"www.lanuit.ens.fr" = "lanuit.ens.fr";
};
retired = mkSubs {
"ens.fr" = [
"alevins"
"www.climatenavigator"
];
"ens.wtf" = [ "photos" ];
"rz.ens.wtf" = [
"s3"
"cdn"
];
"beta.rz.ens.wtf" = [
"todo"
"minecraft"
"factorio"
"home"
"pads"
"api.pads"
"files.pads"
"sandbox.pads"
"jurisprudens"
"rstudio"
];
};
};
services.nginx.virtualHosts.${retiredHost}.default = true;
}