From f6c76320ef92975f70837aef16589dc82593c84a Mon Sep 17 00:00:00 2001 From: 514fpv Date: Sat, 27 Jan 2024 09:56:16 +0800 Subject: [PATCH] feat(focus): add nginx --- spec/focus/nginx.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 spec/focus/nginx.nix diff --git a/spec/focus/nginx.nix b/spec/focus/nginx.nix new file mode 100644 index 00000000..7c8bb5e7 --- /dev/null +++ b/spec/focus/nginx.nix @@ -0,0 +1,24 @@ +{ + services.nginx = { + enable = true; + + # enable all recommended settings + recommendedTlsSettings = true; + recommendedOptimisation = true; + recommendedGzipSettings = true; + recommendedProxySettings = true; + + # set a reasonable default + clientMaxBodySize = "64m"; + + virtualHosts = { + "_" = { + addSSL = true; + useACMEHost = ".sf.514fpv.io"; + extraConfig = "return 444;"; + }; + }; + }; + + networking.firewall.allowedTCPPorts = [ 80 443 ]; +}