Add pre-commit hook to run gitleaks

Search for accidentally included secrets when committing
This commit is contained in:
Evie Litherland-Smith 2024-06-24 07:27:22 +01:00
parent 51af98e49b
commit dc2ccdc7ea
3 changed files with 8 additions and 1 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

5
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,5 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
hooks:
- id: gitleaks

View file

@ -85,7 +85,8 @@
pkgs = import nixpkgs {system = "x86_64-linux";}; pkgs = import nixpkgs {system = "x86_64-linux";};
in in
pkgs.mkShellNoCC { pkgs.mkShellNoCC {
packages = [pkgs.nil]; packages = with pkgs; [nil pre-commit];
shellHook = "pre-commit install --install-hooks";
}; };
homeConfigurations = { homeConfigurations = {
# Server # Server