nixfmt v1.0.0 released! 🥳

This is the first stable release of the official Nix formatter. It implements RFC 166, which defines a standard for Nix formatting.

Great work by the Nix Formatting Team, thanks to everyone involved!

https://github.com/NixOS/nixfmt/releases/tag/v1.0.0

#nix #nixfmt #nixos #nixpkgs

Release v1.0.0 · NixOS/nixfmt

The Nix Formatting Team is happy to present the first stable release of the official Nix formatter! The basis for this milestone is RFC 166, which defined the standard for Nix formatting, establish...

GitHub
Release 1.0.0 by infinisil · Pull Request #316 · NixOS/nixfmt

At last :D

GitHub
@nebucatnetzer #Nixfmt just changed my 711-line module into a 817-line module. Readability was not enhanced.
@nebucatnetzer Just ran into it again with `with types; attrsOf (nullOr (oneOf [ int str bool ]))` This is an easy-to-read #Nix one-line, #Nixfmt turned into 9 lines which now means I can’t see the whole module option in my editor anymore.

Cleaned up my #nixos-config today and finally applied #nixfmt.

Now I should really configure my #emacs to #nixfmt on save.

I still sometimes touch Nix code that hasn't been formatted to the standard yet though and it should not attempt to apply #nixfmt in that case.

How do I do that without needing to manually specify which projects/files to always apply #nixfmt on?

#TIFU

Wanted to try #nixfmt on my #nixos-config tree again, so I ran

fd . -t file --extension nix -x nixfmt

It was taking unusually long but it was loading my CPU alright.
Huh, it really shouldn't be taking *this* long.

Oh, I was in my home directory O.o

Off to finding all the repos with Nix files in them I have on this machine to undo that...