We've improved nixfmt
by using atomic writes to avoid data loss, adding proper indentation and making sure nixfmt
is idempotent so you won't get strange behavior when you run it again.
Please try out our formatter on your code and see if you like the result. For any parts you think are formatted unclearly, please make an issue so we can improve it.
nix-env -f https://github.com/serokell/nixfmt/archive/v0.2.0.tar.gz -i