hm: auto-exclude git tool

What: auto-drop git from bundled toolchain when programs.git.enable.

Why: avoid git-jump buildEnv collision without user config.

Tests: not run (module change)
This commit is contained in:
DJTBOT 2026-01-14 17:43:39 +01:00
parent a55fabb746
commit 5a5382ab92
2 changed files with 6 additions and 2 deletions

View File

@ -595,6 +595,8 @@ Plugins are keyed by their declared `name`. If two plugins declare the same name
### Tool overrides (avoid collisions)
Home Manager auto-excludes `git` when `programs.git.enable = true`.
Drop built-in tools that you already install elsewhere:
```nix

View File

@ -3,11 +3,13 @@
let
cfg = config.programs.clawdbot;
homeDir = config.home.homeDirectory;
autoExcludeTools = lib.optionals config.programs.git.enable [ "git" ];
effectiveExcludeTools = lib.unique (cfg.excludeTools ++ autoExcludeTools);
toolOverrides = {
toolNamesOverride = cfg.toolNames;
excludeToolNames = cfg.excludeTools;
excludeToolNames = effectiveExcludeTools;
};
toolOverridesEnabled = cfg.toolNames != null || cfg.excludeTools != [];
toolOverridesEnabled = cfg.toolNames != null || effectiveExcludeTools != [];
toolSets = import ../../tools/extended.nix ({ inherit pkgs; } // toolOverrides);
defaultPackage =
if toolOverridesEnabled && cfg.package == pkgs.clawdbot