infrastructure/machines/web01/redirections.nix
Tom Hubrecht 55089de144
All checks were successful
build configuration / build_storage01 (push) Successful in 49s
build configuration / build_web01 (push) Successful in 56s
build configuration / build_compute01 (push) Successful in 1m23s
npins update / npins_update (push) Successful in 54s
fix(redirections): Fix the page and host
2023-12-18 23:39:40 +01:00

26 lines
635 B
Nix

{ sources, ... }:
let
retired_host = "retired.dgnum.eu";
redirections = {
"nuage.beta.rz.ens.wtf" = "cloud.dgnum.eu";
"notion.rz.ens.wtf" = "docs.dgnum.eu";
"docs.beta.rz.ens.wtf" = "pads.dgnum.eu";
} // (builtins.listToAttrs (builtins.map (name: {
inherit name;
value = retired_host;
}) retired));
retired = [ "auth.rz.ens.wtf" "photos.ens.wtf" ];
in {
services.nginx.virtualHosts = {
${retired_host} = {
enableACME = true;
forceSSL = true;
root = "${sources.dgnum-retired.outPath}/www";
};
} // (builtins.mapAttrs (host: to: { globalRedirect = to; }) redirections);
}