Make pre-commit
re-use the same config for treefmt
All checks were successful
/ test (push) Successful in 1m23s
All checks were successful
/ test (push) Successful in 1m23s
This commit is contained in:
parent
827f1d16d9
commit
159e7a7c72
1 changed files with 8 additions and 5 deletions
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue