From 120f0aa253b65eacda1220dd5ba9b1bcb01a4dcc Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 30 Jan 2022 19:05:29 +0300 Subject: feat(depotfmt): format Nix code using nixpkgs-fmt Change-Id: Ieffd04e1654e37500a6f6f5e4f29d09137bbc4e9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5142 Tested-by: BuildkiteCI Reviewed-by: sterni --- tools/depotfmt.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools') 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 -- cgit 1.4.1