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, ... }:
{
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;