2023-09-24 06:24:10 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
2023-11-29 19:05:33 +00:00
|
|
|
packages = ["tmpl" "git-age" "ffmd" "kv" "nixfig"];
|
2023-09-02 03:22:33 +00:00
|
|
|
in {
|
|
|
|
services.caddy = {
|
|
|
|
enable = true;
|
|
|
|
virtualHosts = {
|
|
|
|
"jolheiser.com" = {
|
|
|
|
extraConfig = ''
|
2023-09-21 16:12:12 +00:00
|
|
|
handle_path /.well-known/webfinger {
|
2023-09-21 17:32:59 +00:00
|
|
|
header Content-Type application/jrd+json
|
|
|
|
respond ${builtins.toJSON {
|
|
|
|
subject = "acct:john@jolheiser.com";
|
|
|
|
links = [
|
|
|
|
{
|
|
|
|
rel = "http://openid.net/specs/connect/1.0/issuer";
|
|
|
|
href = "https://git.jojodev.com/";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}}
|
2023-09-21 16:12:12 +00:00
|
|
|
}
|
2023-09-02 14:38:14 +00:00
|
|
|
handle_path /bennet* {
|
|
|
|
root * /srv/bennet/src
|
|
|
|
file_server
|
|
|
|
}
|
2023-10-15 20:07:13 +00:00
|
|
|
handle /resume* {
|
|
|
|
root * ${pkgs.jolheiser.resume}
|
|
|
|
rewrite /resume /resume.pdf
|
|
|
|
file_server
|
|
|
|
}
|
2023-09-02 14:38:14 +00:00
|
|
|
handle {
|
2023-09-24 06:28:57 +00:00
|
|
|
root * ${pkgs.jolheiser.website}
|
2023-09-02 14:38:14 +00:00
|
|
|
file_server
|
|
|
|
}
|
2023-09-02 03:22:33 +00:00
|
|
|
'';
|
|
|
|
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>
|
2023-11-24 02:07:01 +00:00
|
|
|
<meta name="go-import" content="go.jolheiser.com/${pkg} git https://git.jojodev.com/jolheiser/${pkg}.git">
|
2023-09-02 03:22:33 +00:00
|
|
|
<meta http-equiv="refresh" content="3; url=https://pkg.go.dev/go.jolheiser.com/${pkg}" />
|
|
|
|
</head><body>
|
|
|
|
Redirecting to <a href="https://pkg.go.dev/go.jolheiser.com/${pkg}">https://pkg.go.dev/go.jolheiser.com/${pkg}</a>
|
|
|
|
</body></html>`
|
|
|
|
'')
|
|
|
|
packages;
|
|
|
|
};
|
2023-11-05 01:53:56 +00:00
|
|
|
"git.jolheiser.com" = {
|
|
|
|
extraConfig = ''
|
|
|
|
redir https://git.jojodev.com/jolheiser{uri}
|
|
|
|
'';
|
|
|
|
};
|
2023-09-02 03:22:33 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|