mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 13:32:15 -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 = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
22
|
22
|
||||||
8080
|
80
|
||||||
];
|
];
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
|
|
@ -44,15 +44,17 @@ in
|
||||||
gateway = [ serviceCfg.interface.gate ];
|
gateway = [ serviceCfg.interface.gate ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.website = {
|
services.caddy = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
enable = true;
|
||||||
after = [ "network.target" ];
|
virtualHosts.":80".extraConfig = ''
|
||||||
serviceConfig = {
|
root * /etc/website
|
||||||
ExecStart = "${pkgs.miniserve}/bin/miniserve /etc/website --index index.html -p 8080";
|
|
||||||
Restart = "always";
|
file_server
|
||||||
};
|
|
||||||
};
|
try_files {path} /index.html
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
microvm = {
|
microvm = {
|
||||||
|
|
@ -66,6 +68,7 @@ in
|
||||||
mac = serviceCfg.interface.mac;
|
mac = serviceCfg.interface.mac;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
shares = [
|
shares = [
|
||||||
{
|
{
|
||||||
source = "/nix/store";
|
source = "/nix/store";
|
||||||
|
|
@ -81,7 +84,9 @@ in
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
virtualHosts.${host}.extraConfig = ''
|
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