commit hooks initial

This commit is contained in:
Callum Leslie 2024-09-04 12:47:37 +01:00
parent cd2ed1be6e
commit 2a6fb7caf6
Signed by: cleslie
GPG key ID: D382C4AFEECEAA90
2 changed files with 23 additions and 0 deletions

View file

@ -53,6 +53,14 @@
}; };
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-compat.follows = "flake-compat";
};
};
flake-compat.url = "github:edolstra/flake-compat";
}; };
outputs = { outputs = {

15
pre-commit-hooks.nix Normal file
View file

@ -0,0 +1,15 @@
{inputs, ...}: {
imports = [inputs.pre-commit-hooks.flakeModule];
perSystem.pre-commit = {
settings.excludes = ["flake.lock"];
settings.hooks = {
alejandra.enable = true;
prettier = {
enable = true;
excludes = [".js" ".md" ".ts"];
};
};
};
}