hotdog: add nginx config for acme in container

This commit is contained in:
lassulus 2023-12-12 16:43:46 +01:00
parent d165a0871c
commit 25d035de77
2 changed files with 25 additions and 0 deletions

View File

@ -4,6 +4,7 @@
imports = [
../../../krebs
../../../krebs/2configs
../../../krebs/2configs/nginx.nix
../../../krebs/2configs/buildbot-stockholm.nix
../../../krebs/2configs/binary-cache/nixos.nix

24
krebs/2configs/nginx.nix Normal file
View File

@ -0,0 +1,24 @@
{
networking.firewall.allowedTCPPorts = [ 80 443 ];
security.acme.acceptTerms = true;
security.acme.defaults.email = "spam@krebsco.de";
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedTlsSettings = true;
enableReload = true;
virtualHosts.default = {
default = true;
locations."= /etc/os-release".extraConfig = ''
default_type text/plain;
alias /etc/os-release;
'';
# needed for acmeFallback in sync-containers, or other machines not reachable globally
locations."~ ^/.well-known/acme-challenge/".root = "/var/lib/acme/acme-challenge";
};
};
}