From 4784e10266c49fad6d4353137642141dd722f275 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Fri, 15 Mar 2024 21:21:34 -0400 Subject: [PATCH] treewide: Add treefmt.toml with configuration to format Nix files --- treefmt.toml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 treefmt.toml diff --git a/treefmt.toml b/treefmt.toml new file mode 100644 index 000000000..fec0bf262 --- /dev/null +++ b/treefmt.toml @@ -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", +]