diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-10 02:13:57 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-10 02:13:57 +0530 |
| commit | d05ec52df2e06ab30f1b3be62aab8af65ecbdee1 (patch) | |
| tree | 5ec63d106655065a0e079c2daa600c8cfb94e510 /flake.nix | |
| parent | bf7a0f704a7ffc64d77f53d940f49f0bd9d4d35e (diff) | |
| download | home-manager-config-d05ec52df2e06ab30f1b3be62aab8af65ecbdee1.tar.gz home-manager-config-d05ec52df2e06ab30f1b3be62aab8af65ecbdee1.zip | |
feat: added git commit hook check to prevent committing the private modules
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -42,6 +42,15 @@ { ... }: { git-hooks.hooks.nixfmt.enable = true; + + git-hooks.hooks.forbid-private = { + enable = true; + name = "Forbid committing private files"; + entry = "found private file in staging! Do not commit files under modules/private/ (except .example.nix files)."; + language = "fail"; + files = "modules/private/"; + excludes = [ "\\.example\\.nix$" ]; + }; } ) ]; |
