helm/modules/services/nginx.nix

25 lines
525 B
Nix
Raw Normal View History

2020-03-28 22:48:43 -07:00
{ config, options, pkgs, lib, ... }:
with lib;
2019-11-17 22:24:50 -08:00
{
2020-03-28 22:48:43 -07:00
options.modules.services.nginx = {
enable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf config.modules.services.nginx.enable {
networking.firewall.allowedTCPPorts = [ 80 443 ];
2019-11-17 22:24:50 -08:00
2020-03-28 22:48:43 -07:00
services.nginx = {
enable = true;
2019-11-17 22:24:50 -08:00
2020-03-28 22:48:43 -07:00
# Use recommended settings
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
};
2019-11-17 22:24:50 -08:00
};
}