Moves treefmt-nix input and configuration from the main flake to the
dev partition, since it's a development-only dependency. Also switches
pre-commit hooks from individual formatter hooks to the unified treefmt
hook for better consistency.
In the previous update commit, the Nix `cc.version` didn't match the
in-output directory name anymore, causing a build failure.
By asking GCC properly, we are robust against such discrepancies.
The script isn't great, relying on GCC "log" output specifics, but it
seems that the GCC output has been like this for a while, and the
lines before and after seem to be intentional about their purpose...
(cherry picked from commit 68f928555660cb914105b0ad668d6cadc25223e9)