nixos/.githooks/pre-commit
Gerg-L c8d102b945 updated boot settings
update pre-commit hook
2023-08-02 18:10:44 -04:00

16 lines
257 B
Bash
Executable file

#!/usr/bin/env bash
STAGED="$(git diff --name-only --cached --diff-filter=d | grep "**.nix" | tr '\n' ' ')"
if [ -z "$STAGED" ]; then
exit 0
fi
for i in $STAGED; do
statix fix -- "$i"
done
deadnix -qe $STAGED
alejandra -q $STAGED
git add $STAGED