I used the treefmt-nix flakeModule. nix fmt will now run a configured treefmt by default. I chose to use the unstable nixfmt as it is now the official formatter (or it will be on the next stable release), this should save us from large future reformats.
Rustfmt was being annoying so I had to create empty files for the declared but unimplemented modules. I'm not entirely sure why cargo fmt ignores this despite using the same rustfmt version.