From 8f1420fc87751beea3bbe07f8eebd2b36ab1e666 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Sun, 1 Jan 2023 21:18:13 +0100
Subject: [PATCH] also check nix files with statix

---
 treefmt.nix | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/treefmt.nix b/treefmt.nix
index 7b39571..e31f8c4 100644
--- a/treefmt.nix
+++ b/treefmt.nix
@@ -17,6 +17,11 @@
             ''
               # First deadnix
               ${pkgs.lib.getExe pkgs.deadnix} --edit "$@"
+
+              for i in "$@"; do
+                ${pkgs.lib.getExe pkgs.statix} fix "$i"
+              done
+
               # Then nixpkgs-fmt
               ${pkgs.lib.getExe pkgs.nixpkgs-fmt} "$@"
             ''