Skip to content

nixos/nginx: add build time syntax validation - #474858

Draft
gepbird wants to merge 2 commits into
NixOS:masterfrom
gepbird:feat/nixos/nginx/build-time-syntax-check
Draft

gepbird wants to merge 2 commits into
NixOS:masterfrom
gepbird:feat/nixos/nginx/build-time-syntax-check

Conversation

@gepbird

@gepbird gepbird commented Dec 28, 2025 •

Copy link
Copy Markdown
Contributor

Motivation and summary

Simple mistakes like forgetting a ; when writing nginx configs can take down all your sites.

This is because the nginx -t test command is being executed in the preStart of the systemd service. Moving this check to build time avoids these accidental small down times.

Fixes #35395.

Prior work

This has been attempted previously in #205561, but it caused some issues and was reverted in #209075.
The main issues were nginx -t being impure: it tried to access the internet to resolve hosts, and tried to read SSL certificates on the disk, which are not available in the nix sandbox.

(A gixy check was added in #57979, it makes the config fail to build if it finds security issues, but it doesn't detect syntax errors.)

Implementation

To combat the previous issues, I created an nginx patch that adds a new -S flag, which behaves like -T, but is skips the impure checks.

Testing

Manually tested this with our config which has proxyPass option with a remote domain that requires internet access to resolve, and of course we have SSL certificates. Syntax validation passes with the current config, and fails with eg. removing a ;.

I'd be happy to add automatic tests, but not sure what's the best approach. The problem is NixOS tests are for runtime asserts, some lib tests that I've met are eval time, what about build time assertions? Is a bash script (with eg. expect) next to the nginx NixOS test preferred, or converting the build time failure to eval time with IFD (I know it's disallowed for regular uses, not sure about tests)?

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Dec 28, 2025
@gepbird
gepbird force-pushed the feat/nixos/nginx/build-time-syntax-check branch 2 times, most recently from b8800be to 2f6b529 Compare December 29, 2025 00:44
gepbird added a commit to tchfoo/raspi-dotfiles that referenced this pull request Dec 29, 2025
Flake lock file updates:

• Added input 'nixpkgs-patch-nixos-nginx-add-build-time-syntax-validation':
    'NixOS/nixpkgs#474858'
gepbird added a commit to tchfoo/raspi-dotfiles that referenced this pull request Dec 29, 2025
Flake lock file updates:

• Added input 'nixpkgs-patch-nixos-nginx-add-build-time-syntax-validation':
    'NixOS/nixpkgs#474858'
@gepbird
gepbird force-pushed the feat/nixos/nginx/build-time-syntax-check branch from 2f6b529 to 346f915 Compare December 29, 2025 01:50
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Dec 29, 2025
@gepbird
gepbird marked this pull request as ready for review December 29, 2025 02:01
gepbird added a commit to tchfoo/raspi-dotfiles that referenced this pull request Dec 31, 2025
Flake lock file updates:

• Updated input 'gep-dotfiles':
    'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=1d6fd8b5f42aaf08c29f5d2448f8b11270911c1d' (2025-12-26)
  → 'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=b76c0c3a0f2433a32d4d3279b0b8ef0afbfe3827' (2025-12-29)
• Removed input 'gep-dotfiles/nixpkgs-patch-nixos-ente-auth-init'
• Updated input 'home-manager':
    'github:nix-community/home-manager/3613abcbd7cf373a59b7f582260ca6b7bd703eaf' (2025-12-28)
  → 'github:nix-community/home-manager/e4e78a2cbeaddd07ab7238971b16468cc1d14daf' (2025-12-30)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/c5db9569ac9cc70929c268ac461f4003e3e5ca80' (2025-12-24)
  → 'github:NixOS/nixos-hardware/9b3c38bf6c260d0e88154ef07fa833fa845bfd14' (2025-12-30)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/3e2499d5539c16d0d173ba53552a4ff8547f4539' (2025-12-25)
  → 'github:NixOS/nixpkgs/c0b0e0fddf73fd517c3471e546c0df87a42d53f4' (2025-12-28)
• Updated input 'nixpkgs-patch-nixos-nginx-add-build-time-syntax-validation':
    'NixOS/nixpkgs#474858'
  → 'NixOS/nixpkgs#474858'
• Updated input 'nur':
    'github:nix-community/NUR/d52c57e1439e4df5f0c733522798c97031a3c9ee' (2025-12-28)
  → 'github:nix-community/NUR/572a9dc34f5f0b6b2c460e92185d63c1fdbb8a9c' (2025-12-30)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/42d96e75aa56a3f70cab7e7dc4a32868db28e8fd' (2025-12-17)
  → 'github:numtide/treefmt-nix/dec15f37015ac2e774c84d0952d57fcdf169b54d' (2025-12-30)
@gepbird
gepbird force-pushed the feat/nixos/nginx/build-time-syntax-check branch from 346f915 to dab92e7 Compare January 3, 2026 20:53
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. and removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 3, 2026
gepbird added a commit to tchfoo/raspi-dotfiles that referenced this pull request Jan 4, 2026
Flake lock file updates:

• Updated input 'gep-dotfiles':
    'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=b76c0c3a0f2433a32d4d3279b0b8ef0afbfe3827' (2025-12-29)
  → 'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=ae28d5d6da1c3a1e880da578b2e3cfb2722710f2' (2026-01-04)
• Added input 'gep-dotfiles/nixpkgs-patch-grayjay-fix-build':
    'NixOS/nixpkgs#475903'
• Added input 'gep-dotfiles/nixpkgs-patch-nvim-treesitter-legacy':
    follows 'nixpkgs-patch-nvim-treesitter-legacy'
• Updated input 'gep-dotfiles/nvim-gep':
    'git+https://git.tchfoo.com/gepbird/nvim?ref=refs/heads/main&rev=5a0910846c385ba01566f8fddd64d2918188f33b' (2025-12-24)
  → 'git+https://git.tchfoo.com/gepbird/nvim?ref=refs/heads/main&rev=c00a8b55a2608a200bbdbd4e7449f428fcf71966' (2026-01-03)
• Updated input 'gep-dotfiles/nvim-gep/neovim-nightly':
    'github:nix-community/neovim-nightly-overlay/14a21b492d6acd79495b14c9d127a94b77c0b72c' (2025-12-24)
  → 'github:nix-community/neovim-nightly-overlay/519c66e44d81e2a752759d60320dbd6f06c14437' (2026-01-03)
• Updated input 'gep-dotfiles/nvim-gep/neovim-nightly/neovim-src':
    'github:neovim/neovim/1aa26f5d55550dd12c2cfd0f74618f0dcd6467ec' (2025-12-23)
  → 'github:neovim/neovim/067b5743f543798f4e58003816fc930f4106c2b0' (2026-01-02)
• Added input 'gep-dotfiles/nvim-gep/nixpkgs-patch-nvim-treesitter-legacy':
    follows 'gep-dotfiles/nixpkgs-patch-nvim-treesitter-legacy'
• Added input 'gep-dotfiles/nvim-gep/nixpkgs-patcher':
    follows 'gep-dotfiles'
• Updated input 'gep-dotfiles/nvim-gep/nixvim':
    'github:nix-community/nixvim/1787eeda5a2ce35bcd57dbb482718b0d897786ae' (2025-12-22)
  → 'github:nix-community/nixvim/d61584cc4cac9af1ba74ad235992df575391276d' (2026-01-02)
• Updated input 'gep-dotfiles/nvim-gep/nvim-treesitter-textobjects':
    'github:nvim-treesitter/nvim-treesitter-textobjects/f7122acf1bd2c9e4626651ad33bf5944be9d9392' (2025-12-24)
  → 'github:nvim-treesitter/nvim-treesitter-textobjects/28a3494c075ef0f353314f627546537e43c09592' (2026-01-03)
• Updated input 'home-manager':
    'github:nix-community/home-manager/e4e78a2cbeaddd07ab7238971b16468cc1d14daf' (2025-12-30)
  → 'github:nix-community/home-manager/1cfa305fba94468f665de1bd1b62dddf2e0cb012' (2026-01-03)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/9b3c38bf6c260d0e88154ef07fa833fa845bfd14' (2025-12-30)
  → 'github:NixOS/nixos-hardware/40b1a28dce561bea34858287fbb23052c3ee63fe' (2025-12-31)
• Updated input 'nixos-raspberrypi':
    'github:nvmd/nixos-raspberrypi/a12cce5710031c44e0e36b581d8e71bc4f157907' (2025-11-26)
  → 'github:nvmd/nixos-raspberrypi/f517fc39419afb6fbec31f9a44de7d41e3a9ad76' (2026-01-02)
• Updated input 'nixos-raspberrypi/flake-compat':
    'github:edolstra/flake-compat/f387cd2afec9419c8ee37694406ca490c3f34ee5' (2025-10-27)
  → follows ''
• Updated input 'nixos-raspberrypi/nixpkgs':
    'github:nvmd/nixpkgs/59714dfc31ef9b9d78c6d581f12169b6665767f8' (2025-11-25)
  → 'github:nvmd/nixpkgs/31926ce9afb1c915fa4190b77ca9be389ccaf18e' (2026-01-02)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c0b0e0fddf73fd517c3471e546c0df87a42d53f4' (2025-12-28)
  → 'github:NixOS/nixpkgs/fb7944c166a3b630f177938e478f0378e64ce108' (2026-01-02)
• Added input 'nixpkgs-patch-librechat-fix-build':
    'NixOS/nixpkgs#476747'
• Removed input 'nixpkgs-patch-nixos-anubis-fix-eval-warning'
• Updated input 'nixpkgs-patch-nixos-nginx-add-build-time-syntax-validation':
    'NixOS/nixpkgs#474858'
  → 'NixOS/nixpkgs#474858'
• Added input 'nixpkgs-patch-nvim-treesitter-legacy':
    'NixOS/nixpkgs#472119'
• Updated input 'nur':
    'github:nix-community/NUR/572a9dc34f5f0b6b2c460e92185d63c1fdbb8a9c' (2025-12-30)
  → 'github:nix-community/NUR/ed59c24d452493c9c0d3d297c1b6c0412d353b4c' (2026-01-03)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/dec15f37015ac2e774c84d0952d57fcdf169b54d' (2025-12-30)
  → 'github:numtide/treefmt-nix/d56486eb9493ad9c4777c65932618e9c2d0468fc' (2026-01-03)
• Updated input 'ymstnt-dotfiles':
    'github:ymstnt/dotfiles/eba522a10a47e00d9e6305a63b12f99e3b2f1175' (2025-12-26)
  → 'github:ymstnt/dotfiles/91c3cd11f9ac27dbd51a20637c5cb57838bcacd4' (2025-12-31)
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 10, 2026
@gepbird
gepbird force-pushed the feat/nixos/nginx/build-time-syntax-check branch from dab92e7 to 4307bff Compare March 13, 2026 00:14
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. and removed 2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Mar 13, 2026
@nixpkgs-ci
nixpkgs-ci Bot requested review from jtojnar, wmertens and zimbatm June 13, 2026 22:05
gepbird added a commit to tchfoo/raspi-dotfiles that referenced this pull request Jun 13, 2026
Flake lock file updates:

• Updated input 'gep-dotfiles':
    'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=056c620db974e8d688e8d2897765c3a916620575' (2026-06-09)
  → 'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=564ffc714a5519fbe196f78185d6aeb999b6604b' (2026-06-13)
• Updated input 'gep-dotfiles/nix-index-database':
    'github:nix-community/nix-index-database/1a2ea89c917781e88508d9fd2b507f2d2a0e173c' (2026-06-07)
  → follows 'nix-index-database'
• Removed input 'gep-dotfiles/nix-index-database/nixpkgs'
• Removed input 'gep-dotfiles/nixpkgs-patch-discord-fix-crash'
• Updated input 'gep-dotfiles/nvim-gep':
    'git+https://git.tchfoo.com/gepbird/nvim?ref=refs/heads/main&rev=301dc9d41a5b6dc5ff0c46a3af8c8c60bb3c8e22' (2026-06-07)
  → 'git+https://git.tchfoo.com/gepbird/nvim?ref=refs/heads/main&rev=36611e8c35563967ee311f5480e786eb1a9631b9' (2026-06-13)
• Updated input 'gep-dotfiles/nvim-gep/neovim-nightly':
    'github:nix-community/neovim-nightly-overlay/4b02dabdaac3d363ad7a86839c548fa4e32aad07' (2026-06-07)
  → 'github:nix-community/neovim-nightly-overlay/62f5f65a671a990fa809031d64379374e89ef225' (2026-06-13)
• Updated input 'gep-dotfiles/nvim-gep/neovim-nightly/neovim-src':
    'github:neovim/neovim/ec7dab077bf6bf53794f2bc42010c977687094a6' (2026-06-06)
  → 'github:neovim/neovim/400f2473972898ecfd89ac3c55222ace0cc248dd' (2026-06-12)
• Updated input 'gep-dotfiles/nvim-gep/nixvim':
    'github:nix-community/nixvim/4b98b6ae9c88b105dacd9fbf8712275b28077ff8' (2026-06-07)
  → 'github:nix-community/nixvim/56f95d165580d4c814955798fa408c66d6843069' (2026-06-13)
• Updated input 'home-manager':
    'github:nix-community/home-manager/c58ead12efcac436afffa93a22099a5595eb4157' (2026-06-09)
  → 'github:nix-community/home-manager/5b6f5733726a1b2ccafb5dec6ac4ca7299fad66c' (2026-06-13)
• Updated input 'moe':
    'github:tchfoo/moe/170c6a3fbf9a4178a25945543a7ef6de5541a59d' (2026-05-12)
  → 'github:tchfoo/moe/81e723cff9d7fe96d942a4504bc6832d10af8c25' (2026-06-10)
• Updated input 'moe/nuget-packageslock2nix':
    'github:mdarocha/nuget-packageslock2nix/d629f61009274fb4cd1fe9b24a30f9849251b25c' (2025-10-21)
  → 'github:mdarocha/nuget-packageslock2nix/17ec397cd003ade07f6254c421320774cbc4e58a' (2026-06-06)
• Added input 'nix-index-database':
    'github:nix-community/nix-index-database/1a2ea89c917781e88508d9fd2b507f2d2a0e173c' (2026-06-07)
• Added input 'nix-index-database/nixpkgs':
    follows ''
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/32c2cd9e46286c4eced3dc6b613c659126bf3cca' (2026-06-09)
  → 'github:NixOS/nixos-hardware/6358ff76821101c178e3ab4919a62799bfe3652e' (2026-06-11)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/a799d3e3886da994fa307f817a6bc705ae538eeb' (2026-06-06)
  → 'github:NixOS/nixpkgs/9ae611a455b90cf061d8f332b977e387bda8e1ca' (2026-06-10)
• Updated input 'nixpkgs-patch-nixos-nginx-add-build-time-syntax-validation':
    'NixOS/nixpkgs#474858'
  → 'NixOS/nixpkgs#474858'
• Updated input 'nixpkgs-patcher':
    'github:gepbird/nixpkgs-patcher/1035997b647799694e4ac1cf217e7ee1c050bce0' (2026-05-18)
  → 'github:gepbird/nixpkgs-patcher/5e3b493622367a11ead8d53134d2dd2be88bd168' (2026-06-13)
• Updated input 'nur':
    'github:nix-community/NUR/9726e40699c42f4aa72e73dc6339d71e9a5dce10' (2026-06-09)
  → 'github:nix-community/NUR/058bd96c478835e243de857c4c0d585364eb2c2d' (2026-06-13)
• Updated input 'ymstnt-dotfiles':
    'git+https://git.tchfoo.com/ymstnt/dotfiles?ref=refs/heads/main&rev=6a07fa84b09cdfe62d523aacbf4457fc1f2bc158' (2026-06-08)
  → 'git+https://git.tchfoo.com/ymstnt/dotfiles?ref=refs/heads/main&rev=e0765931d41e6ca5e2c64d5e25a39ecef01b3eaa' (2026-06-12)
• Added input 'ymstnt-dotfiles/nix-index-database':
    follows 'nix-index-database'
• Updated input 'ymstnt-dotfiles/nixpkgs-patch-brave-origin':
    'NixOS/nixpkgs#513143'
  → 'NixOS/nixpkgs#513143'
@gepbird
gepbird force-pushed the feat/nixos/nginx/build-time-syntax-check branch 2 times, most recently from f359489 to 2acb548 Compare June 15, 2026 23:27
@gepbird
gepbird force-pushed the feat/nixos/nginx/build-time-syntax-check branch from 2acb548 to 7535153 Compare July 1, 2026 19:40
@nixpkgs-ci
nixpkgs-ci Bot requested review from Ma27 and leona-ya July 1, 2026 19:46

@Ma27 Ma27 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried filing a PR against nginx for this?

I think having syntax-checks on build-time rather than deploy-time isn't uncommon. And I'm not a fan of having a downstream-patch for this tbh.

@gepbird

gepbird commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Have you tried filing a PR against nginx for this?

I think having syntax-checks on build-time rather than deploy-time isn't uncommon. And I'm not a fan of having a downstream-patch for this tbh.

I haven't contacted upstream about it, but after a second thought this sounds like a better way, hopefully I'll have time for it in a few days :)

I was seeing this as a somewhat Nix specific problem: in my head most other distros don't have this translation layer for configurations that have a chance to catch issues like this, and they are not sandboxed and have access to networking and SSL certificates, so the already existing -t/-T flags work just as well.
So I thought this wouldn't help others outside of the Nix (and maybe Guix?) community and we should keep it downstream, but it's more like a feature patch (that's not that trivial) instead of a Nix-specific patch that e.g. removes hard coded build tool paths, and I haven't really seen many feature patches in nixpkgs so I agree with your point.

gepbird added a commit to tchfoo/raspi-dotfiles that referenced this pull request Jul 4, 2026
This changes nixos-raspberrypi's branch from main to nixos-unstable
to avoid the buildDTBs eval error.

Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb' (2026-05-13)
  → 'github:hercules-ci/flake-parts/17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e' (2026-07-01)
• Updated input 'gep-dotfiles':
    'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=564ffc714a5519fbe196f78185d6aeb999b6604b' (2026-06-13)
  → 'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=6fb26343823cf0865201fcb27983e75b8f5488da' (2026-07-03)
• Added input 'gep-dotfiles/nixpkgs-patch-stylelint-lsp-fix-build':
    'NixOS/nixpkgs#536260'
• Updated input 'gep-dotfiles/nvim-gep':
    'git+https://git.tchfoo.com/gepbird/nvim?ref=refs/heads/main&rev=36611e8c35563967ee311f5480e786eb1a9631b9' (2026-06-13)
  → 'git+https://git.tchfoo.com/gepbird/nvim?ref=refs/heads/main&rev=133bc0b630df398c78d0d24fa8633e879f2a4105' (2026-07-01)
• Updated input 'gep-dotfiles/nvim-gep/neovim-nightly':
    'github:nix-community/neovim-nightly-overlay/62f5f65a671a990fa809031d64379374e89ef225' (2026-06-13)
  → 'github:nix-community/neovim-nightly-overlay/2b5cf92633caaf2604e7b78d8d16ad92dbb502c6' (2026-06-29)
• Updated input 'gep-dotfiles/nvim-gep/neovim-nightly/neovim-src':
    'github:neovim/neovim/400f2473972898ecfd89ac3c55222ace0cc248dd' (2026-06-12)
  → 'github:neovim/neovim/84cd87908e81da33c8daa5646668939d7ea6afa7' (2026-06-28)
• Added input 'gep-dotfiles/nvim-gep/nixpkgs-patch-stylelint-lsp-fix-build':
    'NixOS/nixpkgs#536260'
• Updated input 'gep-dotfiles/nvim-gep/nixvim':
    'github:nix-community/nixvim/56f95d165580d4c814955798fa408c66d6843069' (2026-06-13)
  → 'github:nix-community/nixvim/78acb50d9aa9cbb5d8e0ac1518d0842a29d70553' (2026-07-01)
• Updated input 'home-manager':
    'github:nix-community/home-manager/5b6f5733726a1b2ccafb5dec6ac4ca7299fad66c' (2026-06-13)
  → 'github:nix-community/home-manager/b885baad531fa3d3beae2ba9a0712d22974d8016' (2026-07-04)
• Updated input 'nix-index-database':
    'github:nix-community/nix-index-database/1a2ea89c917781e88508d9fd2b507f2d2a0e173c' (2026-06-07)
  → 'github:nix-community/nix-index-database/f8ed6cdcb1fd28a6ab7b61f4467a4f67fe2d9074' (2026-07-02)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/6358ff76821101c178e3ab4919a62799bfe3652e' (2026-06-11)
  → 'github:NixOS/nixos-hardware/a9cf7546a938c737b079e738de73934a13de9784' (2026-06-27)
• Updated input 'nixos-raspberrypi':
    'github:nvmd/nixos-raspberrypi/06c6e3513e1ee64b651913193fc6ac38aa4963f5' (2026-05-17)
  → 'github:nvmd/nixos-raspberrypi/19f53ada5ede32d171956f06a842e72016010931' (2026-06-29)
• Updated input 'nixos-raspberrypi/nixpkgs':
    'github:NixOS/nixpkgs/d7a713c0b7e47c908258e71cba7a2d77cc8d71d5' (2026-05-14)
  → 'github:NixOS/nixpkgs/e73de5be04e0eff4190a1432b946d469c794e7b4' (2026-06-26)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/9ae611a455b90cf061d8f332b977e387bda8e1ca' (2026-06-10)
  → 'github:NixOS/nixpkgs/65179426c83bb3f6bc14898b42ea1c6f01d374b0' (2026-07-02)
• Updated input 'nixpkgs-patch-ncps-0-10-0':
    'NixOS/nixpkgs#529765'
  → 'NixOS/nixpkgs#529765'
• Updated input 'nixpkgs-patch-nixos-nginx-add-build-time-syntax-validation':
    'NixOS/nixpkgs#474858'
  → 'NixOS/nixpkgs#474858'
• Added input 'nixpkgs-patch-stylelint-lsp-fix-build':
    'NixOS/nixpkgs#536260'
• Added input 'nixpkgs-patch-vue-language-server-fix-build':
    'NixOS/nixpkgs#537169'
• Updated input 'nixpkgs-patcher':
    'github:gepbird/nixpkgs-patcher/5e3b493622367a11ead8d53134d2dd2be88bd168' (2026-06-13)
  → 'github:gepbird/nixpkgs-patcher/d2abed2b94b7955e05b4e2e8a9b8ac45597ecf94' (2026-06-18)
• Updated input 'nur':
    'github:nix-community/NUR/058bd96c478835e243de857c4c0d585364eb2c2d' (2026-06-13)
  → 'github:nix-community/NUR/b1c0055fdc7a24866d9e6a1b65df207c7a373095' (2026-07-04)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/9ed65852b6257fbeae4355bc24ecfea307ca759a' (2026-06-04)
  → 'github:Mic92/sops-nix/f1406619a3884cd5c47992a70b8b35c9c0fcb4c9' (2026-07-04)
@gepbird
gepbird force-pushed the feat/nixos/nginx/build-time-syntax-check branch from 7535153 to a39bf51 Compare September 9, 2026 08:07
@gepbird
gepbird marked this pull request as draft September 9, 2026 08:07
gepbird added a commit to tchfoo/raspi-dotfiles that referenced this pull request Sep 9, 2026
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/9d0d87172c374f89da73c1cfe6d81ae62feac1f1' (2026-08-24)
  → 'github:hercules-ci/flake-parts/31729ca8cbdb4fa927b34e5f4353e6a83f39e993' (2026-09-03)
• Updated input 'gep-dotfiles':
    'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=397ae0b6f9541419efdf0f4475f57cda197f139e' (2026-09-01)
  → 'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=cb7f7301e2c1fc890fa357810d86076241076d18' (2026-09-07)
• Updated input 'gep-dotfiles/import-tree':
    'github:denful/import-tree/8961e2418a12a71e08943c9f3d8cf6dbbc3cd172' (2026-08-31)
  → 'github:denful/import-tree/eb1b52eaecc57f7c136d07ae8a93e724dfecac46' (2026-09-03)
• Updated input 'home-manager':
    'github:nix-community/home-manager/1dc2d1f720ab17fc7981e087346bf54b26d284b1' (2026-09-01)
  → 'github:nix-community/home-manager/a2dbe7c2c9333e8234ae8114c7f731784201d108' (2026-09-09)
• Updated input 'nix-index-database':
    'github:nix-community/nix-index-database/dbb978fa87faf13398e90ccbc52c343d21c7dd6d' (2026-08-30)
  → 'github:nix-community/nix-index-database/116ad1c2adb642405ef8916f6a94c8626f971344' (2026-09-06)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/dc3f0cfde2050172abf6c3cdb684f735c15a57c5' (2026-08-29)
  → 'github:NixOS/nixos-hardware/62173785b9a18c78b4a15aca2623d02bceb9d077' (2026-09-08)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/34ab99075ac4f7e40cf037eef32cb1c360bb85e9' (2026-08-31)
  → 'github:NixOS/nixpkgs/d6524aaca2ff07876657ae2b323f24be4874944b' (2026-09-08)
• Updated input 'nixpkgs-patch-nixos-nginx-add-build-time-syntax-validation':
    'NixOS/nixpkgs#474858'
  → 'NixOS/nixpkgs#474858'
• Updated input 'nur':
    'github:nix-community/NUR/c753e542cfb8bddf1cc8224eed3cb66cc4616b1d' (2026-09-01)
  → 'github:nix-community/NUR/26eef3a67cfa36f4575d1c7c26ff8fc1ba44d29e' (2026-09-09)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/a8627b21b9107c5711c96b84f32a9a4b3d45295f' (2026-08-13)
  → 'github:Mic92/sops-nix/13616fff713a9f94055c66f15687ebdc17a335df' (2026-09-09)
• Updated input 'tangled-core':
    'git+https://tangled.org/tangled.org/core?ref=refs/heads/master&rev=fd22e5cc227c5ebfa5183a6647d6548805c87468' (2026-08-31)
  → 'git+https://tangled.org/tangled.org/core?ref=refs/heads/master&rev=338719d7d4f1e1e32becc4f4d3ef04f3c7daeb32' (2026-09-07)
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 19, 2026
@gepbird
gepbird force-pushed the feat/nixos/nginx/build-time-syntax-check branch from a39bf51 to 5ee0899 Compare October 21, 2026 12:23
@gepbird gepbird removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 21, 2026
gepbird added a commit to tchfoo/raspi-dotfiles that referenced this pull request Oct 21, 2026
Flake lock file updates:

• Updated input 'gep-dotfiles':
    'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=158d8a91518b8fcd39be297ad6e996ac1a0d9bf0' (2026-10-18)
  → 'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=cba9787f5d98ad8b621e51176d64ffdd846e8198' (2026-10-21)
• Added input 'gep-dotfiles/nixpkgs-patch-fix-CVE-2026-111943':
    'NixOS/nixpkgs#576390'
• Updated input 'home-manager':
    'github:nix-community/home-manager/640725978b99076e18e069f6e7d2959124584f8f' (2026-10-15)
  → 'github:nix-community/home-manager/ec80131710bffcdf3b8498cf41f3a0579833b023' (2026-10-20)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/60a624466c08787ee8303393b7d4752d1826f14f' (2026-10-11)
  → 'github:NixOS/nixos-hardware/efb6d0d5e2394c3c5416a18652808aba206c0988' (2026-10-20)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/fe13242281a67641c0102cdb1087f0ebe586c7df' (2026-10-15)
  → 'github:NixOS/nixpkgs/02c087f3fe673c9e317f206a627cb6b910336dbe' (2026-10-20)
• Removed input 'nixpkgs-patch-fix-CVE-2026-111943'
• Updated input 'nixpkgs-patch-nixos-nginx-add-build-time-syntax-validation':
    'NixOS/nixpkgs#474858'
  → 'NixOS/nixpkgs#474858'
• Updated input 'nur':
    'github:nix-community/NUR/7a691473c0a5a05d8b6093f6065d957abd4c7a02' (2026-10-18)
  → 'github:nix-community/NUR/22455345e60a58bba23b9d12f5e61ab448c51131' (2026-10-21)
• Updated input 'tangled-core':
    'git+https://tangled.org/tangled.org/core?ref=refs/heads/master&rev=dad751949f865d6189f7602e1409c5f951e75771' (2026-10-18)
  → 'git+https://tangled.org/tangled.org/core?ref=refs/heads/master&rev=c7ff2e9373e4df5aa7592a6a3958b2da84e300ca' (2026-10-21)
• Updated input 'ymstnt-dotfiles':
    'git+https://git.tchfoo.com/ymstnt/dotfiles?ref=refs/heads/main&rev=a9d5457f2a842748681dcc75eb90547648339c1e' (2026-10-18)
  → 'git+https://git.tchfoo.com/ymstnt/dotfiles?ref=refs/heads/main&rev=347bd3bb3b2c4452fbf24f9a1831f5d79de9f15e' (2026-10-19)
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 24, 2026
@gepbird
gepbird force-pushed the feat/nixos/nginx/build-time-syntax-check branch from 5ee0899 to a11817d Compare October 24, 2026 22:52
@nixpkgs-ci nixpkgs-ci Bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 24, 2026
gepbird added a commit to tchfoo/raspi-dotfiles that referenced this pull request Oct 26, 2026
Flake lock file updates:

• Updated input 'gep-dotfiles':
    'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=cba9787f5d98ad8b621e51176d64ffdd846e8198' (2026-10-21)
  → 'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=3fab84685caeb9a4a983c7c87a1b846862a1b079' (2026-10-25)
• Removed input 'gep-dotfiles/nixpkgs-patch-fix-CVE-2026-111943'
• Updated input 'gep-dotfiles/nvim-gep':
    'git+https://git.tchfoo.com/gepbird/nvim?ref=refs/heads/main&rev=991b65338f250ee1e5cb09079e1abf483f9c505b' (2026-10-03)
  → 'git+https://git.tchfoo.com/gepbird/nvim?ref=refs/heads/main&rev=406697fd28227b863911ff2de9a620f9941b8d26' (2026-10-20)
• Updated input 'gep-dotfiles/nvim-gep/neovim-nightly':
    'github:nix-community/neovim-nightly-overlay/7bf3d61b3c3a914c55d717205b5a2f039bf2f864' (2026-10-03)
  → 'github:nix-community/neovim-nightly-overlay/115e5969ce726297a7700f834e202ea999fbd557' (2026-10-20)
• Updated input 'gep-dotfiles/nvim-gep/neovim-nightly/neovim-src':
    'github:neovim/neovim/28d641b5607025c34153e11272fbd270ac673f85' (2026-10-02)
  → 'github:neovim/neovim/b3c7c191fa8156ac66d86bb614537944c010d6a2' (2026-10-19)
• Updated input 'gep-dotfiles/nvim-gep/nixvim':
    'github:nix-community/nixvim/1cdfef1a6eb583d65b606b04fc97687491479d62' (2026-10-02)
  → 'github:nix-community/nixvim/453dc9c5037e6d1bec81d2a51ddacd58a2f44e9c' (2026-10-17)
• Updated input 'home-manager':
    'github:nix-community/home-manager/ec80131710bffcdf3b8498cf41f3a0579833b023' (2026-10-20)
  → 'github:nix-community/home-manager/c216bf5a1f173b0481bd5c8c489ebe5595ecc68c' (2026-10-25)
• Updated input 'nix-index-database':
    'github:nix-community/nix-index-database/1b4d1758fa6053c5d6284254a793134fa602fbff' (2026-10-18)
  → 'github:nix-community/nix-index-database/93696586f3463024cceb089353539be95a38ae2b' (2026-10-25)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/efb6d0d5e2394c3c5416a18652808aba206c0988' (2026-10-20)
  → 'github:NixOS/nixos-hardware/1b418b8f203e49a92f250f8babdd19af1b6f7a7f' (2026-10-22)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/02c087f3fe673c9e317f206a627cb6b910336dbe' (2026-10-20)
  → 'github:NixOS/nixpkgs/3ec636362e1816bc2f0888fa0fa2c69f1bc9e504' (2026-10-23)
• Updated input 'nixpkgs-patch-nixos-nginx-add-build-time-syntax-validation':
    'NixOS/nixpkgs#474858'
  → 'NixOS/nixpkgs#474858'
• Removed input 'nixpkgs-patch-php-fix-CVE-2026-1096--18--19'
• Updated input 'nur':
    'github:nix-community/NUR/22455345e60a58bba23b9d12f5e61ab448c51131' (2026-10-21)
  → 'github:nix-community/NUR/c315b811c2a7ffe36b33119231124bb7f816d358' (2026-10-26)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/44931708c62937c2b1bf7953902989fa5bb9ee1b' (2026-10-15)
  → 'github:Mic92/sops-nix/442449fa7b1fe6c692d0103ac9fc8f9e82931cf3' (2026-10-24)
• Updated input 'tangled-core':
    'git+https://tangled.org/tangled.org/core?ref=refs/heads/master&rev=c7ff2e9373e4df5aa7592a6a3958b2da84e300ca' (2026-10-21)
  → 'git+https://tangled.org/tangled.org/core?ref=refs/heads/master&rev=12ebb0c96f615a31991c20a144bf08b146bfcabd' (2026-10-21)
• Updated input 'ymstnt-dotfiles':
    'git+https://git.tchfoo.com/ymstnt/dotfiles?ref=refs/heads/main&rev=347bd3bb3b2c4452fbf24f9a1831f5d79de9f15e' (2026-10-19)
  → 'git+https://git.tchfoo.com/ymstnt/dotfiles?ref=refs/heads/main&rev=e3e444eb05fa0488773767987e7b32116b17dcce' (2026-10-25)
• Updated input 'ymstnt-dotfiles/blip':
    'github:blip-net/nix/34dee223931f7ff3eddcf98f089c925569bfb7e8' (2026-10-12)
  → 'github:blip-net/nix/eeaed45e714126c8dc1f634a92c2d70ec3992d90' (2026-10-18)
• Removed input 'ymstnt-dotfiles/nixpkgs-patch-lix-fix-build'
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 26, 2026
@gepbird
gepbird force-pushed the feat/nixos/nginx/build-time-syntax-check branch from a11817d to e1aa28e Compare October 29, 2026 01:23
It is a lightweight version of `-T` that only validates the syntax,
skips testing modules, avoids creating a pidfile, etc.
Impurities like inet host resolution (requires internet) and
SSL certificate lookups (usually requires accessing /var/lib/acme/)
are disabled with `-S`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nginx: Check syntax also at build time

2 participants