From 140a7df916f6257c755b8663fb27ed79e81c8e89 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron <886074+teto@users.noreply.github.com> Date: Thu, 10 Apr 2025 19:57:41 +0200 Subject: [PATCH] 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 --------- Co-authored-by: Austin Horstman --- flake.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 14a014246..c7b3847de 100644 --- a/flake.nix +++ b/flake.nix @@ -48,7 +48,14 @@ forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; in { - formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-tree); + formatter = forAllSystems ( + system: + nixpkgs.legacyPackages.${system}.nixfmt-tree.override { + settings = { + tree-root-file = "release.json"; + }; + } + ); packages = forAllSystems ( system: