Files
dotfiles/.claude/tasks/0015-git-module.md
alexion c9fc17ecf5 feat(git): declare the operator's commit identity (task 0015)
Git identity lived only in one checkout's local configuration on one
machine, so it was invisible to every other checkout and lost on a
reimage. Declare it as a module instead, enabled on neogaia.

It is a module rather than base plumbing so a host that should not carry
a personal commit identity can decline it.
2026-07-20 10:53:47 -04:00

2.8 KiB

What to build

A git Module, following the Enable convention and configured natively through home-manager, that carries the operator's commit identity — enabled on neogaia.

Today that identity exists only in one repository's local configuration on one machine. It is therefore invisible to every other checkout, absent from any future Host, and lost on a reimage. Declaring it makes committing work anywhere, reproducibly, like everything else in the flake.

The identity matches the one already present throughout this repository's history, so existing commits and future ones agree. Committing it is not a disclosure: it appears in every commit this repository has ever published.

It is a Module rather than base plumbing because a Host that should not carry a personal commit identity is easy to imagine once the servers exist.

Acceptance criteria

  • A git Module following the Enable convention exists and is enabled on neogaia
  • The commit identity is configured through home-manager and matches the one used in existing history
  • nix flake check builds the neogaia toplevel
  • Manual confirmation: committing in a repository outside this checkout succeeds with no per-command identity override
  • The stale note in the project's agent instructions claiming git identity is unconfigured is corrected, since commits already work here through repository-local configuration

Implementation Notes

programs.git.userName/userEmail are renamed in this home-manager pin and emit an obsolete-option trace. The module uses settings.user.name/settings.user.email. Do not "fix" it back.

The commit name is the literal "alexion" rather than config.user.name, which review raised as duplication. A Unix login and a commit display name are separate concepts that merely coincide here, so binding them would let a host overriding its login silently rewrite the operator's commit identity.

The manual confirmation was met against the built configuration, not the running machine: nixos-rebuild switch needs sudo and has not run, so ~/.config/git/config does not yet exist on neogaia. The generated gitconfig was built from the neogaia toplevel and a commit driven under env -i with a scratch HOME, producing alexion <contact@alexion.dev> with no per-command override. This proves the derivation rather than the deployment, and the live check remains owed at the next rebuild.

Review surfaced an unanticipated hazard that proved harmless. Home-manager writes ~/.config/git/config, while an undeclared ~/.gitconfig also exists and outranks it per key. It holds only a tea credential helper and no user.*, so it does not shadow the identity, confirmed by re-running the commit test with both files present. Declaring that credential helper is a reasonable follow-up, since it will not survive a reimage.