pre-commit devShell

This commit is contained in:
Primrose 2024-06-06 22:55:56 +02:00
parent 817986b317
commit 28c9634485
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
4 changed files with 118 additions and 5 deletions

View file

@ -0,0 +1,19 @@
{ inputs, ... }:
{
imports = [ inputs.pre-commit-hooks.flakeModule ];
perSystem =
{ pkgs, config, ... }:
{
pre-commit = {
check.enable = true;
settings.hooks = {
nixfmt.enable = true;
nixfmt.package = pkgs.nixfmt-rfc-style;
# statix.enable = true; # FIXME: seems to loop
deadnix.enable = true;
};
};
devShells.default = pkgs.mkShell { shellHook = config.pre-commit.installationScript; };
};
}