flake: checks: use 'pre-commit-hooks' module
This commit is contained in:
parent
c82eb57070
commit
8657774d06
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue