flake: format the tree with one treefmt

The pre-commit hooks kept their own list of formatters, so nixpkgs-fmt in
a hook and nixfmt in the check disagreed the moment flake-checks moved.
`nix fmt` is now built from the same treefmt module the formatting check
is, and the hook and the Makefile both call it.
This commit is contained in:
Kristoffer Dalby
2026-09-10 05:33:45 +00:00
parent f1186d8e00
commit d59c1ed209
5 changed files with 28 additions and 19 deletions
+2 -1
View File
@@ -109,7 +109,8 @@ prek run --all-files # run hooks on the full tree
Hooks cover: file hygiene (trailing whitespace, line endings, BOM),
syntax validation (JSON/YAML/TOML/XML), merge-conflict markers, private
key detection, nixpkgs-fmt, prettier, and `golangci-lint` via
key detection, `treefmt` (the same formatter `nix fmt` and the flake's
formatting check run), `mdformat` for `docs/`, and `golangci-lint` via
`--new-from-rev=HEAD~1` (see the golangci-lint hook in .pre-commit-config.yaml). A manual
invocation with an `upstream/main` remote is equivalent: