add keys file host

This commit is contained in:
2026-05-02 00:33:50 -05:00
parent d7af3ae96f
commit ebfb46082f
2 changed files with 24 additions and 7 deletions
+23 -6
View File
@@ -53,12 +53,14 @@ in
auto_https ignore_loaded_certs
'';
# virtualHosts."key.${homelab.public_domain}" = {
# extraConfig = ''
# root * /var/www/keys
# file_server
# '';
# };
virtualHosts."keys.${homelab.base_domain}" = {
serverAliases = [ "keys.${homelab.public_domain}" ];
extraConfig = ''
tls internal
root /var/www/keys
file_server browse /etc/caddy/browse.html
'';
};
};
# enable acme for auto ssl certs with lets encrypt
@@ -93,6 +95,21 @@ in
};
};
environment.etc."caddy/browse.html".text = ''
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{html .Name}}</title>
<style>
footer { display: none !important; }
</style>
</head>
<body>
{{template "listing" .}}
</body>
</html>
'';
# add to backups
homelab.backups.baks = {