feat(git): declare the operator's commit identity (task 0015) #8

Merged
alexion merged 4 commits from task-0015-git-module into main 2026-07-20 12:23:23 -04:00
Owner

Task: .claude/tasks/0015-git-module.md

Declares the operator's commit identity as a git module enabled on neogaia, so it stops living only in one checkout's local configuration on one machine.

Deviations

  • programs.git.userName/userEmail are renamed in this home-manager pin and emit an obsolete-option trace, so the module uses settings.user.name/settings.user.email.
  • The commit name is the literal "alexion" rather than config.user.name. 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 criterion 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 toplevel and a commit driven under env -i with a scratch HOME, producing alexion <contact@alexion.dev> with no per-command override. That proves the derivation rather than the deployment, and the live check remains owed at the next rebuild.
  • Review surfaced a 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.*, 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.

Review

Overall: MEDIUM

  • Blast radius: Medium — adds a home-manager-managed gitconfig on any host enabling modules.git (currently one).
  • Reversibility: Low — delete the module and a one-line host toggle; no state migration.
  • Test coverage: Medium — nothing in-repo exercises the option; local config can mask a broken module.
  • Sensitive domain: Low — commit identity only; the email is already public in all history.
  • Size & complexity: Low — 25 new lines, a plain mkIf with no branching.
  • Runtime criticality: Medium — lands in a real machine's activation path, so an eval failure blocks a rebuild.

Unaddressed findings:

  • Standards — settings.user.name duplicates config.user.name. Declined: the two are separate concepts that coincide here, and binding them would couple commit identity to the Unix login.
  • Spec — live confirmation on the deployed machine not run. Deferred: it needs a nixos-rebuild switch, which requires sudo. Verified against the built configuration instead, as described above.

— Claude

Task: `.claude/tasks/0015-git-module.md` Declares the operator's commit identity as a git module enabled on `neogaia`, so it stops living only in one checkout's local configuration on one machine. ## Deviations - `programs.git.userName`/`userEmail` are renamed in this home-manager pin and emit an obsolete-option trace, so the module uses `settings.user.name`/`settings.user.email`. - The commit name is the literal `"alexion"` rather than `config.user.name`. 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 criterion 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 toplevel and a commit driven under `env -i` with a scratch `HOME`, producing `alexion <contact@alexion.dev>` with no per-command override. That proves the derivation rather than the deployment, and the live check remains owed at the next rebuild. - Review surfaced a 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.*`, 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. ## Review **Overall: MEDIUM** - Blast radius: Medium — adds a home-manager-managed gitconfig on any host enabling `modules.git` (currently one). - Reversibility: Low — delete the module and a one-line host toggle; no state migration. - Test coverage: Medium — nothing in-repo exercises the option; local config can mask a broken module. - Sensitive domain: Low — commit identity only; the email is already public in all history. - Size & complexity: Low — 25 new lines, a plain `mkIf` with no branching. - Runtime criticality: Medium — lands in a real machine's activation path, so an eval failure blocks a rebuild. Unaddressed findings: - **Standards — `settings.user.name` duplicates `config.user.name`.** Declined: the two are separate concepts that coincide here, and binding them would couple commit identity to the Unix login. - **Spec — live confirmation on the deployed machine not run.** Deferred: it needs a `nixos-rebuild switch`, which requires sudo. Verified against the built configuration instead, as described above. — Claude
alexion added 1 commit 2026-07-20 10:54:14 -04:00
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.
alexion reviewed 2026-07-20 11:11:51 -04:00
@@ -36,6 +36,7 @@
modules.fish.enable = true;
modules.fish.defaultShell = true;
modules.git.enable = true;
Author
Owner

Should be enabled on every host.

Should be enabled on every host.
alexion added 1 commit 2026-07-20 11:15:18 -04:00
Default the module on rather than restating it per host, so a new host
commits without remembering the line. A host that should not carry a
personal identity sets enable to false.
Author
Owner

Done in 75c5745. modules.git.enable now defaults to true, and the explicit line in hosts/neogaia/default.nix is removed as redundant.

I defaulted the option rather than moving the identity into system/default.nix, so the opt-out this task's rationale asked for survives — a server that should not carry a personal commit identity sets modules.git.enable = false. Setting it from the shared base config instead would have made a host's false a conflicting definition needing mkForce.

Verified the neogaia toplevel hashes identically before and after (nixos-system-neogaia-26.11.20260715.753cc8a), and that extendModules with enable = false does switch it off.

— Claude

Done in 75c5745. `modules.git.enable` now defaults to `true`, and the explicit line in `hosts/neogaia/default.nix` is removed as redundant. I defaulted the option rather than moving the identity into `system/default.nix`, so the opt-out this task's rationale asked for survives — a server that should not carry a personal commit identity sets `modules.git.enable = false`. Setting it from the shared base config instead would have made a host's `false` a conflicting definition needing `mkForce`. Verified the `neogaia` toplevel hashes identically before and after (`nixos-system-neogaia-26.11.20260715.753cc8a`), and that `extendModules` with `enable = false` does switch it off. — Claude
alexion added 1 commit 2026-07-20 12:20:17 -04:00
Defaulting the module on hid it from a host's config, leaving no single
place that lists what a host carries. Each host enables it explicitly
instead, at the cost of a step when adding one.
Author
Owner

Reverted in 62eb628, per the operator: enable defaults to false again and hosts/neogaia/default.nix enables it explicitly.

The checklist property won over not having to restate the line — a host now reads as a complete list of what it carries, with no default-on module hidden from it. The tradeoff is that enabling git becomes a step when adding a host.

modules/git.nix and hosts/neogaia/default.nix are byte-identical to c9fc17e; only the docs record the round trip. The neogaia toplevel hashed identically across all three commits.

— Claude

Reverted in 62eb628, per the operator: `enable` defaults to false again and `hosts/neogaia/default.nix` enables it explicitly. The checklist property won over not having to restate the line — a host now reads as a complete list of what it carries, with no default-on module hidden from it. The tradeoff is that enabling git becomes a step when adding a host. `modules/git.nix` and `hosts/neogaia/default.nix` are byte-identical to c9fc17e; only the docs record the round trip. The `neogaia` toplevel hashed identically across all three commits. — Claude
alexion added 1 commit 2026-07-20 12:22:38 -04:00
Also note that `git config --global` lists only ~/.gitconfig and is not a
view of what git resolves, which misreads as the module's file being
ignored.
alexion merged commit 4ecb86052b into main 2026-07-20 12:23:23 -04:00
alexion deleted branch task-0015-git-module 2026-07-20 12:23:23 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alexion/dotfiles#8