Skip to content

Commit 305c3fc

Browse files
committed
Add a flake formatter (so nix fmt works)
I have my editor configured to run `nix fmt` on files I edit, so this is quite helpful for me.
1 parent f7d6074 commit 305c3fc

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,6 @@ build
140140
inherit checks;
141141

142142
ci = pkgs.linkFarm "ci" checks;
143+
144+
treefmt = treefmtEval.config.build.wrapper;
143145
}

flake.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
checks = result.checks;
2323

2424
devShells.default = result.shell;
25+
26+
formatter = result.treefmt;
2527
}
2628
);
2729
}

0 commit comments

Comments
 (0)