nixfmt
is a formatter for Nix code, intended to easily apply a uniform style.
You are encouraged to test this out on your code and submit any undesirable formatting you find as an issue
-
Nix with flakes
nix profile install github:serokell/nixfmt
Haskell dependencies will be built by Nix.
- Enter
nix-shell
- Build with
cabal new-build
Haskell dependencies will be built by Cabal.
- Build with
cabal new-build
nixfmt < input.nix
– reads Nix code formstdin
, formats it, and outputs tostdout
nixfmt file.nix
– format the file in place
We welcome issues and pull requests on GitHub.
nixfmt
is maintained and funded with ❤️ by
Serokell. The names and logo for Serokell are trademark
of Serokell OÜ.
We love open source software! See our other projects or hire us to design, develop and grow your idea!