feat(web01): Add a hub for redirections
This commit is contained in:
parent
07622970ab
commit
16a63b37d3
3 changed files with 38 additions and 0 deletions
|
@ -15,6 +15,7 @@ lib.extra.mkConfig {
|
|||
"matterbridge"
|
||||
"ntfy-sh"
|
||||
"plausible"
|
||||
"redirections"
|
||||
"wordpress"
|
||||
];
|
||||
|
||||
|
|
26
machines/web01/redirections.nix
Normal file
26
machines/web01/redirections.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ 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);
|
||||
}
|
|
@ -26,6 +26,17 @@
|
|||
"url": "https://github.com/zhaofengli/attic/archive/e9918bc6be268da6fa97af6ced15193d8a0421c0.tar.gz",
|
||||
"hash": "13h7gqai2lbsp0qqp1spv76fjjsha2lygpvzxk7vzl09h9hnhy5a"
|
||||
},
|
||||
"dgnum-retired": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "Git",
|
||||
"url": "https://git.dgnum.eu/DGNum/dgnum-retired"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "d481b8cf7a7816c851e36ce0a0ed4a776d00eb9c",
|
||||
"url": null,
|
||||
"hash": "1hpjra1gz9vx9j7dpvc7h8czhrlizpgwnfc7z4al4xw146dv0bp0"
|
||||
},
|
||||
"disko": {
|
||||
"type": "GitRelease",
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in a new issue