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 =
|
perSystem =
|
||||||
{ ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
treefmt.config = {
|
treefmt.config = {
|
||||||
projectRootFile = ".git/config";
|
projectRootFile = ".git/config";
|
||||||
|
flakeFormatter = true;
|
||||||
|
flakeCheck = true;
|
||||||
programs = {
|
programs = {
|
||||||
nixfmt.enable = true;
|
nixfmt.enable = true;
|
||||||
deadnix.enable = false;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pre-commit.settings.hooks = {
|
pre-commit.settings = {
|
||||||
nixfmt-rfc-style.enable = true;
|
hooks.treefmt = {
|
||||||
deadnix.enable = false;
|
enable = true;
|
||||||
|
package = config.treefmt.build.wrapper;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue