forked from DGNum/infrastructure
40 lines
883 B
Nix
40 lines
883 B
Nix
{ sources, ... }:
|
|
|
|
let
|
|
retired_host = "retired.dgnum.eu";
|
|
|
|
redirections = {
|
|
"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;
|
|
};
|
|
} // (builtins.listToAttrs (builtins.map (name: {
|
|
inherit name;
|
|
value.to = retired_host;
|
|
}) retired));
|
|
|
|
retired = [
|
|
"auth.rz.ens.wtf"
|
|
"photos.ens.wtf"
|
|
"alevins.ens.fr"
|
|
"www.climatenavigator.ens.fr"
|
|
];
|
|
|
|
in {
|
|
services.nginx.virtualHosts = {
|
|
${retired_host} = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
|
|
root = "${sources.dgnum-retired.outPath}/www";
|
|
};
|
|
} // (builtins.mapAttrs (host:
|
|
{ to, ssl ? false }: {
|
|
globalRedirect = to;
|
|
enableACME = ssl;
|
|
forceSSL = ssl;
|
|
}) redirections);
|
|
}
|