mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
convert caddy to nixos builtin
This commit is contained in:
parent
71b4ca1448
commit
33a7017375
18 changed files with 326 additions and 263 deletions
41
nix/apps/old-redirects/default.nix
Normal file
41
nix/apps/old-redirects/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ ... }:
|
||||
let
|
||||
permanent = [
|
||||
{ from = "www.noratrieb.dev"; to = "noratrieb.dev"; }
|
||||
{ from = "blog.noratrieb.dev"; to = "noratrieb.dev/blog"; }
|
||||
{ from = "nilstrieb.dev"; to = "noratrieb.dev"; }
|
||||
{ from = "www.nilstrieb.dev"; to = "noratrieb.dev"; }
|
||||
{ from = "blog.nilstrieb.dev"; to = "noratrieb.dev/blog"; }
|
||||
{ from = "bisect-rustc.nilstrieb.dev"; to = "bisect-rustc.noratrieb.dev"; }
|
||||
{ from = "docker.nilstrieb.dev"; to = "docker.noratrieb.dev"; }
|
||||
{ from = "hugo-chat.nilstrieb.dev"; to = "hugo-chat.noratrieb.dev"; }
|
||||
{ from = "api.hugo-chat.nilstrieb.dev"; to = "api.hugo-chat.noratrieb.dev"; }
|
||||
{ from = "uptime.nilstrieb.dev"; to = "uptime.noratrieb.dev"; }
|
||||
{ from = "olat.nilstrieb.dev"; to = "olat.noratrieb.dev"; }
|
||||
{ from = "olat.nilstrieb.dev:8088"; to = "olat.noratrieb.dev"; }
|
||||
];
|
||||
in
|
||||
{
|
||||
services.caddy.virtualHosts = (
|
||||
{
|
||||
"bisect-rustc.noratrieb.dev" = {
|
||||
logFormat = "";
|
||||
extraConfig = "redir https://github.com/Noratrieb/cargo-bisect-rustc-service?tab=readme-ov-file#cargo-bisect-rustc-service";
|
||||
};
|
||||
"uptime.noratrieb.dev" = {
|
||||
logFormat = "";
|
||||
extraConfig = "redir https://github.com/Noratrieb/uptime?tab=readme-ov-file#uptime";
|
||||
};
|
||||
}
|
||||
) // (
|
||||
builtins.listToAttrs (map
|
||||
(redirect: {
|
||||
name = redirect.from;
|
||||
value = {
|
||||
logFormat = "";
|
||||
extraConfig = "redir https://${redirect.to}{uri} permanent";
|
||||
};
|
||||
})
|
||||
permanent)
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue