1
0
Fork 0

chore: just redirect all go.jolheiser.com URIs

Signed-off-by: jolheiser <john.olheiser@gmail.com>
main
jolheiser 2023-12-21 18:53:37 -06:00
parent 8355a99641
commit efdaff2b13
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
1 changed files with 8 additions and 19 deletions

View File

@ -1,10 +1,4 @@
{ {pkgs, ...}: {
pkgs,
lib,
...
}: let
packages = ["tmpl" "git-age" "ffmd" "kv" "nixfig"];
in {
services.caddy = { services.caddy = {
enable = true; enable = true;
virtualHosts = { virtualHosts = {
@ -39,20 +33,15 @@ in {
serverAliases = ["www.jolheiser.com"]; serverAliases = ["www.jolheiser.com"];
}; };
"go.jolheiser.com" = { "go.jolheiser.com" = {
extraConfig = extraConfig = ''
''
header Content-Type text/html header Content-Type text/html
respond / `<html><head><title>Go Packages</title></head><body><ul>${lib.strings.concatMapStrings (pkg: "<li><a href=\"${pkg}\">${pkg}</a></li>") packages}</ul></body></html>` respond /* `<html><head>
'' <meta name="go-import" content="go.jolheiser.com{uri} git https://git.jojodev.com/jolheiser{uri}.git">
+ lib.strings.concatMapStrings (pkg: '' <meta http-equiv="refresh" content="3; url=https://pkg.go.dev/go.jolheiser.com{uri}" />
respond /${pkg}* `<html><head>
<meta name="go-import" content="go.jolheiser.com/${pkg} git https://git.jojodev.com/jolheiser/${pkg}.git">
<meta http-equiv="refresh" content="3; url=https://pkg.go.dev/go.jolheiser.com/${pkg}" />
</head><body> </head><body>
Redirecting to <a href="https://pkg.go.dev/go.jolheiser.com/${pkg}">https://pkg.go.dev/go.jolheiser.com/${pkg}</a> Redirecting to <a href="https://pkg.go.dev/go.jolheiser.com{uri}">https://pkg.go.dev/go.jolheiser.com{uri}</a>
</body></html>` </body></html>`
'') '';
packages;
}; };
"git.jolheiser.com" = { "git.jolheiser.com" = {
extraConfig = '' extraConfig = ''