Skip to content

Commit 140a7df

Browse files
tetokhaneliman
andauthored
formatter: use a different treefmt root (#6792)
* formatter: use a different treefmt root Problem: i use jujutsu as a VCS these days https://jj-vcs.github.io/jj/ and when using jujutsu workspaces, they dont contain the `.git` file/folder that git worktrees have. solution: use a different (unique) root file. I first tried with flake.nix for instnace but we have several in the tree while is only one "release.json" * Update flake.nix Co-authored-by: Austin Horstman <[email protected]> --------- Co-authored-by: Austin Horstman <[email protected]>
1 parent 92266c9 commit 140a7df

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

flake.nix

+8-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@
4848
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
4949
in
5050
{
51-
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-tree);
51+
formatter = forAllSystems (
52+
system:
53+
nixpkgs.legacyPackages.${system}.nixfmt-tree.override {
54+
settings = {
55+
tree-root-file = "release.json";
56+
};
57+
}
58+
);
5259

5360
packages = forAllSystems (
5461
system:

0 commit comments

Comments
 (0)