How to use nixfmt for nixpkgs?

Nixpkgs will use nixfmt-rfc-style, the official formatter (repo). This is already enforced for new and already-formatted files, and a treewide reformat is planned, see Treewide Nix reformat pass 1 [skip treewide] by infinisil · Pull Request #322537 · NixOS/nixpkgs · GitHub and its links.

We don’t have a lot of resources, so things are moving slow, but we only have like a single blocking issue before we can move forward with the full Nixpkgs reformat. See Formatting Team Meeting 2024-10-01, Don't expand final list arguments of functions by infinisil · Pull Request #254 · NixOS/nixfmt · GitHub and Better list argument handling by piegamesde · Pull Request #257 · NixOS/nixfmt · GitHub. We could use more help with this!

The formatting team is scheduled to have the bi-weekly meeting again tomorrow at 2024-11-26T19:00:00Z where we should discuss how to move forward. Anybody is free to join the meeting, there’s also a Matrix room :slight_smile:

3 Likes