treewide: Add treefmt.toml with configuration to format Nix files

This commit is contained in:
Dmitry Bogatov 2024-03-15 21:21:34 -04:00
parent e6fa37167f
commit 4784e10266
1 changed files with 14 additions and 0 deletions

14
treefmt.toml Normal file
View File

@ -0,0 +1,14 @@
# One CLI to format the code tree - https://github.com/numtide/treefmt
[formatter.nix]
command = "alejandra"
options = ["-q"]
includes = ["*.nix"]
excludes = [
# Naturally, I don't want to reformat vendored nixpkgs, otherwise no patch will ever
# apply.
"nixpkgs/*.nix",
# Despite the extension, this file is actually jinja2 tempate for nix file.
"cookiecutter/haskell/*/default.nix",
# Auto-generated by niv(1)
"nix/sources.nix",
]