Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions users/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@

xdg.configFile = {
"git".source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/git";
# A store copy, not out-of-store: see the header of the file.
"git-agent/config".source = ./home/git/agent.gitconfig;
"nvim".source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/kapi-vim";
} // pkgs.lib.optionalAttrs (! lite) {
"wezterm".source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/wezterm";
Expand Down
39 changes: 39 additions & 0 deletions users/home/git/agent.gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Git config for AI agent sessions: everything from the normal config, with output trimmed
# for token cost. Claude Code selects it via GIT_CONFIG_GLOBAL in ~/.claude/settings.json;
# interactive shells never read it.
#
# home-manager links a Nix store copy to ~/.config/git-agent/config (users/home.nix), so it
# exists whatever branch the main checkout is on, and `git config --global` from an agent
# fails instead of editing this tracked file. Edits take effect after `make home`.
#
# GIT_CONFIG_GLOBAL replaces both global files, so include both (a missing one is skipped).
[include]
path = ~/.config/git/config
path = ~/.gitconfig

# Short status with the branch line, instead of the long form with hint paragraphs.
[status]
short = true
branch = true

# Hint paragraphs written for people learning git.
[advice]
statusHints = false
detachedHead = false
addEmptyPathspec = false
commitBeforeMerge = false
resolveConflict = false
skippedCherryPicks = false
pushUpdateRejected = false
setUpstreamFailure = false
forceDeleteBranch = false
defaultBranchName = false

[fetch]
output = compact

[merge]
stat = false

# No pager, color or delta overrides: agents' output is never a TTY, so git already skips
# them.
Loading