Skip to content

Commit a54ee8a

Browse files
committed
flake-modules: explicitly set the same nixfmt for treefmt + pre-commit
1 parent d978995 commit a54ee8a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

flake-modules/dev/default.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,27 @@
88

99
perSystem =
1010
{ pkgs, config, ... }:
11+
let
12+
fmt = pkgs.nixfmt-rfc-style;
13+
in
1114
{
1215
treefmt.config = {
1316
projectRootFile = "flake.nix";
1417

1518
programs = {
16-
nixfmt-rfc-style.enable = true;
19+
nixfmt = {
20+
enable = true;
21+
package = fmt;
22+
};
1723
statix.enable = true;
1824
};
1925
};
2026

2127
pre-commit = {
2228
settings.hooks = {
2329
nixfmt = {
24-
package = pkgs.nixfmt-rfc-style;
2530
enable = true;
31+
package = fmt;
2632
};
2733
statix = {
2834
enable = true;

0 commit comments

Comments
 (0)