blob: 1a3df789e0d9b5b8419da2d41040dc586ea69767 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
{ config, lib, ... }:
let
cfg = config.xnet.nginx;
inherit (lib) mkOption mkIf types;
in
{
options.xnet.nginx = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable optimized nginx.";
};
};
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.nginx = {
enable = true;
recommendedBrotliSettings = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
recommendedZstdSettings = true;
};
};
}
|