Make pre-commit re-use the same config for treefmt
All checks were successful
/ test (push) Successful in 1m23s

This commit is contained in:
Andrea Ciceri 2024-11-15 10:06:16 +01:00
parent 827f1d16d9
commit 159e7a7c72
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg

View file

@ -11,19 +11,22 @@
];
perSystem =
{ ... }:
{ config, ... }:
{
treefmt.config = {
projectRootFile = ".git/config";
flakeFormatter = true;
flakeCheck = true;
programs = {
nixfmt.enable = true;
deadnix.enable = false;
};
};
pre-commit.settings.hooks = {
nixfmt-rfc-style.enable = true;
deadnix.enable = false;
pre-commit.settings = {
hooks.treefmt = {
enable = true;
package = config.treefmt.build.wrapper;
};
};
};