From 5d2f5934f85ba0f9c0f062f87828c4e9897b0605 Mon Sep 17 00:00:00 2001 From: Alice Huston Date: Mon, 15 Jan 2024 13:18:56 -0500 Subject: [PATCH] Add pre-commit-update hook, make nixpkgs-fmt check only (#40) * Add pre-commit-update hook, make nixpkgs-fmt check only Signed-off-by: ahuston-0 * Pin pre-commit-update at commit ID of latest version Signed-off-by: ahuston-0 --------- Signed-off-by: ahuston-0 --- flake.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 1716940..3bdfa31 100644 --- a/flake.nix +++ b/flake.nix @@ -67,12 +67,23 @@ config = { repos = [ + { + repo = "https://gitlab.com/vojko.pribudic/pre-commit-update"; + rev = "89c51188f5fb88a346d0e17773605857fce4aa42"; + hooks = [ + { + id = "pre-commit-update"; + args = [ "--dry-run" ]; + } + ]; + } { repo = "local"; hooks = [ { - id = "nixpkgs-fmt"; + id = "nixpkgs-fmt check"; entry = "${nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt}/bin/nixpkgs-fmt"; + args = [ "--check" ]; language = "system"; files = "\\.nix"; }