nix-treefmt-formatter
Installation
SKILL.md
treefmt-nix formatter with a CI-enforced check
One formatter.nix gives you nix fmt (format everything) and a format check that makes nix flake check fail on unformatted code. Requires inputs.treefmt-nix (with inputs.nixpkgs.follows = "nixpkgs").
In a blueprint repo, the file lives at <prefix>/formatter.nix and is auto-wired: it becomes the flake formatter output and the package formatter, whose passthru.tests land in checks.<sys>.pkgs-formatter-*. Without blueprint, export build.wrapper as formatter.<sys> and build.check under checks yourself.