mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 07:28:12 +09:00
46 lines
873 B
Nix
46 lines
873 B
Nix
{ inputs, ... }:
|
|
{
|
|
imports = [
|
|
inputs.git-hooks-nix.flakeModule
|
|
];
|
|
|
|
perSystem =
|
|
{
|
|
pkgs,
|
|
config,
|
|
...
|
|
}:
|
|
{
|
|
pre-commit.settings = {
|
|
hooks = {
|
|
treefmt = {
|
|
enable = true;
|
|
|
|
package = config.treefmt.build.wrapper;
|
|
};
|
|
|
|
gitleaks = {
|
|
enable = true;
|
|
name = "gitleaks";
|
|
description = "Detect hardcoded secrets";
|
|
|
|
entry = "${pkgs.gitleaks}/bin/gitleaks dir --no-banner --redact --verbose .";
|
|
|
|
pass_filenames = false;
|
|
|
|
stages = [
|
|
"pre-commit"
|
|
"pre-push"
|
|
];
|
|
};
|
|
|
|
actionlint.enable = true;
|
|
deadnix.enable = true;
|
|
ruff.enable = true;
|
|
statix.enable = true;
|
|
shellcheck.enable = true;
|
|
};
|
|
};
|
|
};
|
|
}
|