aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--flake.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 3a28b51..70438e9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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$" ];
+ };
}
)
];