From 3cabe5719c8084bcfe87b90da779bcd72082b14d Mon Sep 17 00:00:00 2001 From: vkcku Date: Tue, 2 Jun 2026 08:15:13 +0530 Subject: root: poor man's CI monorepo-revid: 81ecb1e1cb320d9c9d7e5b8d14af34304f52ef00 --- root/hooks/pre-push | 5 +++++ root/nix/devshell.nix | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100755 root/hooks/pre-push (limited to 'root') diff --git a/root/hooks/pre-push b/root/hooks/pre-push new file mode 100755 index 0000000..2b9ae9e --- /dev/null +++ b/root/hooks/pre-push @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -euo pipefail + +nix run .#checks diff --git a/root/nix/devshell.nix b/root/nix/devshell.nix index 98131e4..80eefe0 100644 --- a/root/nix/devshell.nix +++ b/root/nix/devshell.nix @@ -9,6 +9,15 @@ packages = [ pkgs.nixd ]; + + shellHook = '' + hooksdir="$(git rev-parse --show-toplevel)/root/hooks" + if [ ! -d "$hooksdir" ]; then + echo "error: hooks directory not found at $hooksdir" + exit 1 + fi + git config set core.hooksPath "$hooksdir" + ''; }; devShells.root = -- cgit v1.3.1