mirror of https://git.jolheiser.com/dotnix.git
feat(dragonwell): allow for nonstandard modules from past forges in caddy
Signed-off-by: jolheiser <john.olheiser@gmail.com>teamcity
parent
dd2761b1d6
commit
4c9de84663
|
@ -1,4 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
{pkgs, ...}: let
|
||||
modules = import ./go.nix;
|
||||
in {
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
|
@ -35,6 +37,7 @@
|
|||
"go.jolheiser.com" = {
|
||||
extraConfig = ''
|
||||
header Content-Type text/html
|
||||
${modules}
|
||||
respond /* `<html><head>
|
||||
<meta name="go-import" content="go.jolheiser.com{path} git https://git.jojodev.com/jolheiser{path}.git">
|
||||
<meta http-equiv="refresh" content="3; url=https://pkg.go.dev/go.jolheiser.com{path}" />
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
let
|
||||
modules = [
|
||||
{
|
||||
name = "hcaptcha";
|
||||
repo = "gitea.com/jolheiser/hcaptcha";
|
||||
}
|
||||
{
|
||||
name = "pwn";
|
||||
repo = "gitea.com/jolheiser/pwn";
|
||||
}
|
||||
];
|
||||
in
|
||||
builtins.concatStringsSep "\n" (builtins.map (module: ''
|
||||
respond /${module.name}* `<html><head>
|
||||
<meta name="go-import" content="go.jolheiser.com/${module.name} git https://${module.repo}.git">
|
||||
<meta http-equiv="refresh" content="3; url=https://pkg.go.dev/go.jolheiser.com/${module.name}" />
|
||||
</head><body>
|
||||
Redirecting to <a href="https://pkg.go.dev/go.jolheiser.com/${module.name}">https://pkg.go.dev/go.jolheiser.com/${module.name}</a>
|
||||
</body></html>`
|
||||
'')
|
||||
modules)
|
Loading…
Reference in New Issue