nixos-config/modules/system/services/server/nginx/default.nix

25 lines
490 B
Nix

{ config, lib, ... }:
{
imports = [
./acme
./rtmp
./user
./virtualhosts
];
options.services.webserver.enable = lib.mkEnableOption "Enable nginx webpages";
config = lib.mkIf config.services.nginx.enable {
services.nginx = {
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
};
networking.firewall.allowedTCPPorts = [
80
443
];
};
}