Alejandra is written in Rust, has more tests than nixfmt, and handles non-trivial code examples in Nix better.
Note that the behavior of 1.0.0 is different than older versions, however it doesn't appear to randomly stop working like before.