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
+11
View File
@@ -278,6 +278,17 @@
drv = pkgs.headscale;
};
# `nix fmt` is built from the same treefmt module as the formatting
# check, so the two cannot disagree. Every formatter the tree is judged
# by lives here, not in a hand-kept list of pre-commit hooks.
formatter = fc.formatter (
common
// {
goFmt = "off";
prettier = true;
}
);
checks = {
headscale = pkgs.testers.nixosTest (import ./nix/tests/headscale.nix);
}