infrastructure/modules/dgn-web.nix

27 lines
558 B
Nix
Raw Normal View History

{ config, lib, ... }:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.dgn-web;
in {
options.dgn-web = {
enable = mkEnableOption "sane defaults for web services.";
};
config = mkIf cfg.enable {
services.nginx = {
enable = true;
recommendedBrotliSettings = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
recommendedZstdSettings = true;
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
};
}