nginx/module.nix: init
This commit is contained in:
parent
5767763227
commit
982125fd1d
1 changed files with 33 additions and 0 deletions
33
modules/services/nginx/module.nix
Normal file
33
modules/services/nginx/module.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkDefault;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
cfg = config.modules.system.services.nginx;
|
||||
in {
|
||||
options.modules.system.services.nginx.enable = mkEnableOption "nginx";
|
||||
config = mkIf cfg.enable {
|
||||
security = {
|
||||
acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "charlie@charlieroot.dev";
|
||||
};
|
||||
};
|
||||
services.nginx = {
|
||||
package = pkgs.nginxQuic;
|
||||
statusPage = true;
|
||||
|
||||
recommendedTlsSettings = true;
|
||||
recommendedBrotliSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedZstdSettings = true;
|
||||
|
||||
clientMaxBodySize = mkDefault "512m";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue