diff --git a/.pre-commit-entry.sh b/.pre-commit-entry.sh new file mode 100755 index 0000000..3577577 --- /dev/null +++ b/.pre-commit-entry.sh @@ -0,0 +1,3 @@ +#! /usr/bin/env sh + +nix run github:kamadorueda/alejandra -- -q "$@" diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml new file mode 100644 index 0000000..af03c1a --- /dev/null +++ b/.pre-commit-hooks.yaml @@ -0,0 +1,7 @@ +- id: alejandra + name: alejandra + description: Format Nix code with Alejandra. + entry: .pre-commit-entry.sh + language: script + files: \.nix$ + minimum_pre_commit_version: 1.18.1