{ 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); }