Using the nginx module on NixOS[1] and enabling services.nginx.validateConfigFil, which defaults to true, generated nginx configurations will be checked by Gixy[2].
The build will actually fail if Gixy finds any issues.<p>[1]: <a href="https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/modules/services/web-servers/nginx/default.nix">https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/modu...</a>
[2]: <a href="https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/writers/scripts.nix#L973">https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build...</a>