flake: checks: use 'pre-commit-hooks' module

This commit is contained in:
Bruno BELANYI 2023-03-09 09:04:34 +00:00
parent c82eb57070
commit 8657774d06

View file

@ -1,11 +1,15 @@
{ self, inputs, ... }: { self, inputs, ... }:
{ {
perSystem = { system, ... }: { imports = [
checks = { inputs.pre-commit-hooks.flakeModule
# NOTE: seems like inputs' does not output the 'lib' attribute ];
pre-commit = inputs.pre-commit-hooks.lib.${system}.run {
src = self;
perSystem = { system, ... }: {
pre-commit = {
# Add itself to `nix flake check`
check.enable = true;
settings = {
hooks = { hooks = {
nixpkgs-fmt = { nixpkgs-fmt = {
enable = true; enable = true;