nixfmt

Format Nix language code with consistent style and indentation

brewmacoslinux
Try with needOr install directly
Source

About

Command-line tool to format Nix language code

Commands

nixfmt

Examples

Format a single Nix file in-place$ nixfmt configuration.nix
Format multiple Nix files$ nixfmt *.nix
Format and output to stdout without modifying file$ nixfmt < input.nix