From 8657774d06df97effc34239eaa5e2cbc3d0f862c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 9 Mar 2023 09:04:34 +0000 Subject: [PATCH] flake: checks: use 'pre-commit-hooks' module --- flake/checks.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/flake/checks.nix b/flake/checks.nix index 50f20b1..4a8c04f 100644 --- a/flake/checks.nix +++ b/flake/checks.nix @@ -1,11 +1,15 @@ { self, inputs, ... }: { - perSystem = { system, ... }: { - checks = { - # NOTE: seems like inputs' does not output the 'lib' attribute - pre-commit = inputs.pre-commit-hooks.lib.${system}.run { - src = self; + imports = [ + inputs.pre-commit-hooks.flakeModule + ]; + perSystem = { system, ... }: { + pre-commit = { + # Add itself to `nix flake check` + check.enable = true; + + settings = { hooks = { nixpkgs-fmt = { enable = true;