mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
flake-modules: explicitly set the same nixfmt for treefmt + pre-commit
This commit is contained in:
parent
d9789956d9
commit
a54ee8ad64
1 changed files with 8 additions and 2 deletions
|
@ -8,12 +8,18 @@
|
||||||
|
|
||||||
perSystem =
|
perSystem =
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
fmt = pkgs.nixfmt-rfc-style;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
treefmt.config = {
|
treefmt.config = {
|
||||||
projectRootFile = "flake.nix";
|
projectRootFile = "flake.nix";
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
nixfmt-rfc-style.enable = true;
|
nixfmt = {
|
||||||
|
enable = true;
|
||||||
|
package = fmt;
|
||||||
|
};
|
||||||
statix.enable = true;
|
statix.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -21,8 +27,8 @@
|
||||||
pre-commit = {
|
pre-commit = {
|
||||||
settings.hooks = {
|
settings.hooks = {
|
||||||
nixfmt = {
|
nixfmt = {
|
||||||
package = pkgs.nixfmt-rfc-style;
|
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = fmt;
|
||||||
};
|
};
|
||||||
statix = {
|
statix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue