chore: just redirect all go.jolheiser.com URIs
Signed-off-by: jolheiser <john.olheiser@gmail.com>main
parent
8355a99641
commit
efdaff2b13
|
@ -1,10 +1,4 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
packages = ["tmpl" "git-age" "ffmd" "kv" "nixfig"];
|
||||
in {
|
||||
{pkgs, ...}: {
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
|
@ -39,20 +33,15 @@ in {
|
|||
serverAliases = ["www.jolheiser.com"];
|
||||
};
|
||||
"go.jolheiser.com" = {
|
||||
extraConfig =
|
||||
''
|
||||
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>`
|
||||
''
|
||||
+ lib.strings.concatMapStrings (pkg: ''
|
||||
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}" />
|
||||
extraConfig = ''
|
||||
header Content-Type text/html
|
||||
respond /* `<html><head>
|
||||
<meta name="go-import" content="go.jolheiser.com{uri} git https://git.jojodev.com/jolheiser{uri}.git">
|
||||
<meta http-equiv="refresh" content="3; url=https://pkg.go.dev/go.jolheiser.com{uri}" />
|
||||
</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>`
|
||||
'')
|
||||
packages;
|
||||
'';
|
||||
};
|
||||
"git.jolheiser.com" = {
|
||||
extraConfig = ''
|
||||
|
|
Reference in New Issue