Add nginx to servers
This commit is contained in:
parent
601e3c55c1
commit
f4c07fb59c
3 changed files with 32 additions and 3 deletions
|
@ -1,2 +1,6 @@
|
||||||
# Configuration unique to servers
|
# Configuration unique to servers
|
||||||
{ ... }: { }
|
{ ... }: {
|
||||||
|
imports = [
|
||||||
|
./services/nginx.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
# Mostly future-proofing, but also for the transition to this infra
|
|
||||||
{ ... }: { }
|
|
27
config/services/nginx.nix
Normal file
27
config/services/nginx.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.nginx = {
|
||||||
|
additionalModules = [ pkgs.nginxModules.brotli ];
|
||||||
|
clientMaxBodySize = "100m";
|
||||||
|
enable = true;
|
||||||
|
httpConfig = ''
|
||||||
|
brotli on;
|
||||||
|
brotli_types
|
||||||
|
application/atom+xml
|
||||||
|
application/javascript
|
||||||
|
application/json
|
||||||
|
application/xml
|
||||||
|
application/xml+rss
|
||||||
|
image/svg+xml
|
||||||
|
text/css
|
||||||
|
text/javascript
|
||||||
|
text/plain
|
||||||
|
text/xml;
|
||||||
|
'';
|
||||||
|
package = pkgs.nginxQuic;
|
||||||
|
recommendedGzipSettings = true;
|
||||||
|
recommendedOptimisation = true;
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
resolver.addresses = [ "127.0.0.1" "[::1]" ];
|
||||||
|
sslProtocols = "TLSv1.3";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue