spec(focus): configure nginx

This commit is contained in:
514fpv 2024-01-27 09:56:16 +08:00
parent 335e88caf4
commit 500b87a877
Signed by: koishi
SSH key fingerprint: SHA256:2jRvFSzG5UeUlQ3WxZ2sbUOfo5wNKzv1fZsk/FexKjQ

24
spec/focus/nginx.nix Normal file
View file

@ -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 ];
}