Last active
November 26, 2020 13:47
-
-
Save grahamc/79dc490dc605688a86d7a45bcb1d73e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
domain = "netboot.gsc.io"; | |
in | |
{ resources, config, options, pkgs, ... }: { | |
systemd.tmpfiles.rules = [ | |
"d ${config.services.nginx.virtualHosts."${domain}".root} 0755 netboot nginx" | |
]; | |
networking.firewall.allowedTCPPorts = [ | |
80 # nginx | |
443 # nginx | |
]; | |
security.acme.certs."${domain}".keyType = "rsa4096"; | |
services.nginx = { | |
enable = true; | |
recommendedTlsSettings = true; | |
sslProtocols = "TLSv1.2"; | |
sslCiphers = "AES256-SHA256"; | |
virtualHosts = { | |
"${domain}" = { | |
root = "/var/lib/nginx/netboot/webroot"; | |
enableACME = true; | |
forceSSL = true; | |
http2 = false; | |
}; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment