mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 05:27:13 -06:00
fix: tls certs
This commit is contained in:
parent
4c132e6728
commit
3790698e42
1 changed files with 15 additions and 10 deletions
|
|
@ -23,7 +23,7 @@ in
|
|||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
22
|
||||
8080
|
||||
80
|
||||
];
|
||||
|
||||
services.openssh = {
|
||||
|
|
@ -44,15 +44,17 @@ in
|
|||
gateway = [ serviceCfg.interface.gate ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.website = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.miniserve}/bin/miniserve /etc/website --index index.html -p 8080";
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts.":80".extraConfig = ''
|
||||
root * /etc/website
|
||||
|
||||
file_server
|
||||
|
||||
try_files {path} /index.html
|
||||
'';
|
||||
};
|
||||
|
||||
microvm = {
|
||||
|
|
@ -66,6 +68,7 @@ in
|
|||
mac = serviceCfg.interface.mac;
|
||||
}
|
||||
];
|
||||
|
||||
shares = [
|
||||
{
|
||||
source = "/nix/store";
|
||||
|
|
@ -81,7 +84,9 @@ in
|
|||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts.${host}.extraConfig = ''
|
||||
reverse_proxy ${serviceCfg.interface.ip}:8080
|
||||
reverse_proxy ${serviceCfg.interface.ip}:80
|
||||
|
||||
tls /var/lib/acme/${host}/fullchain.pem /var/lib/acme/${host}/key.pem
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue