infrastructure/modules/dgn-web.nix
Tom Hubrecht 958afe957f feat(modules): Init dgn-web
Add a module to enable recommended web settings
2023-10-01 23:08:54 +02:00

26 lines
558 B
Nix

{ 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 ];
};
}