nixos-conf/servers/utils/nginx-https-server.nix

26 lines
520 B
Nix
Raw Normal View History

2025-05-29 02:12:20 +03:00
{ lib, ... }:
{
options.services.nginx.virtualHosts = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule {
config = lib.mkDefault {
forceSSL = true;
kTLS = true;
};
}
);
};
config = {
networking.firewall.allowedTCPPorts = [ 443 ];
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedTlsSettings = true;
recommendedProxySettings = true;
};
};
}