Skip to content

Instantly share code, notes, and snippets.

@grahamc
Last active November 26, 2020 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grahamc/79dc490dc605688a86d7a45bcb1d73e8 to your computer and use it in GitHub Desktop.
Save grahamc/79dc490dc605688a86d7a45bcb1d73e8 to your computer and use it in GitHub Desktop.
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