Wire hooks into devenv and flake checks

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019dpKwZWtahQU4V2NhpVmLt
This commit is contained in:
ariandClaude Sonnet 5.5 committed 2026-10-20 10:19:46 -04:00
1 parent 46c644ff2b
commit 0bddfbb063
4 files changed
+109 -1

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
# Git hooks. The checks themselves live in dev/hooks/ (shared with the Nix
# flake checks in nix/checks.nix); this file only wires them into git-hooks.
# Hooks install when a devenv shell is entered. See docs/hooks.md.
{ pkgs, ... }:
{
packages = [
pkgs.taplo
pkgs.yamllint
pkgs.shellcheck
pkgs.markdownlint-cli
pkgs.nushell
];
git-hooks.hooks = {
# Fast: fmt, clippy (Rust files only), lint, secret scan.
slinuxm-pre-commit = {
enable = true;
name = "slinuxm pre-commit";
entry = "dev/hooks/run.sh pre-commit";
language = "system";
pass_filenames = false;
always_run = true;
stages = [ "pre-commit" ];
};
# Path-filtered tests and slow checks. Skip one run with
# SKIP=slinuxm-pre-push git push (pre-commit framework variable).
slinuxm-pre-push = {
enable = true;
name = "slinuxm pre-push";
entry = "dev/hooks/run.sh pre-push";
language = "system";
pass_filenames = false;
always_run = true;
stages = [ "pre-push" ];
};
};
}