From e88f5b6bbcc2f430e4a4b7ed9189c45bd0e8201f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Reynier?= <88983487+loicreynier@users.noreply.github.com> Date: Tue, 31 May 2022 14:17:44 +0200 Subject: [PATCH] docs: add pre-commit-hooks.nix example --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 22f31cb..1bc8663 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,16 @@ - id: alejandra # Requires Nix to be previously installed in the system - id: alejandra-system # Requires Alejandra to be previously installed in the system ``` + + - [pre-commit-hooks.nix](https://github.com/cachix/pre-commit-hooks.nix) + + ```nix + pre-commit-check = pre-commit-hooks.lib.${system}.run { + hooks = { + alejandra.enable = true; + }; + }; + ``` ## Getting started