about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tools/depotfmt.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/depotfmt.nix b/tools/depotfmt.nix
index 0be32091b7..2d70c3f2b9 100644
--- a/tools/depotfmt.nix
+++ b/tools/depotfmt.nix
@@ -18,6 +18,14 @@ let
     [formatter.tf]
     command = "${terraformat}"
     includes = [ "*.tf" ]
+
+    [formatter.nix]
+    command = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt"
+    includes = [ "*.nix" ]
+    excludes = [
+      "third_party/nix/tests/*",
+      "third_party/nix/src/tests/*"
+    ]
   '';
 
   # helper tool for formatting the depot interactively