This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
{
|
||||
perSystem =
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
pre-commit = {
|
||||
settings = {
|
||||
hooks = {
|
||||
statix.enable = true;
|
||||
zizmor.enable = true;
|
||||
typos.enable = true;
|
||||
deadnix = {
|
||||
enable = true;
|
||||
settings.edit = true;
|
||||
};
|
||||
fmt = {
|
||||
enable = true;
|
||||
name = "nix fmt";
|
||||
entry = "${lib.getExe config.formatter} --no-cache";
|
||||
};
|
||||
ty = {
|
||||
enable = true;
|
||||
name = "ty check";
|
||||
files = "\\.py$";
|
||||
entry = lib.getExe (
|
||||
pkgs.writeShellScriptBin "ty-check" ''
|
||||
cd tests/
|
||||
${lib.getExe pkgs.uv} run ty check
|
||||
''
|
||||
);
|
||||
};
|
||||
actionlint = {
|
||||
enable = true;
|
||||
files = "^\\.github/workflows/.*\\.(yml|yaml)$";
|
||||
};
|
||||
yamllint = {
|
||||
enable = true;
|
||||
settings.configPath = ".yamllint.yaml";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user