add keys file host
This commit is contained in:
@@ -71,7 +71,7 @@ in {
|
|||||||
|
|
||||||
services.caddy.virtualHosts."${url}" = {
|
services.caddy.virtualHosts."${url}" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
tls /etc/ssl/blakedheld.xyz.crt /etc/ssl/blakedheld.xyz.key
|
tls internal
|
||||||
reverse_proxy 127.0.0.1:2222
|
reverse_proxy 127.0.0.1:2222
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -53,12 +53,14 @@ in
|
|||||||
auto_https ignore_loaded_certs
|
auto_https ignore_loaded_certs
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# virtualHosts."key.${homelab.public_domain}" = {
|
virtualHosts."keys.${homelab.base_domain}" = {
|
||||||
# extraConfig = ''
|
serverAliases = [ "keys.${homelab.public_domain}" ];
|
||||||
# root * /var/www/keys
|
extraConfig = ''
|
||||||
# file_server
|
tls internal
|
||||||
# '';
|
root /var/www/keys
|
||||||
# };
|
file_server browse /etc/caddy/browse.html
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# enable acme for auto ssl certs with lets encrypt
|
# 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
|
# add to backups
|
||||||
homelab.backups.baks = {
|
homelab.backups.baks = {
|
||||||
|
|||||||
Reference in New Issue
Block a user