feat(git): declare the operator's commit identity (task 0015) #8
Reference in New Issue
Block a user
Delete Branch "task-0015-git-module"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task:
.claude/tasks/0015-git-module.mdDeclares 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/userEmailare renamed in this home-manager pin and emit an obsolete-option trace, so the module usessettings.user.name/settings.user.email."alexion"rather thanconfig.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.nixos-rebuild switchneeds sudo and has not run, so~/.config/git/configdoes not yet exist onneogaia. The generated gitconfig was built from the toplevel and a commit driven underenv -iwith a scratchHOME, producingalexion <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.~/.config/git/config, while an undeclared~/.gitconfigalso exists and outranks it per key. It holds only ateacredential helper and nouser.*, 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
modules.git(currently one).mkIfwith no branching.Unaddressed findings:
settings.user.nameduplicatesconfig.user.name. Declined: the two are separate concepts that coincide here, and binding them would couple commit identity to the Unix login.nixos-rebuild switch, which requires sudo. Verified against the built configuration instead, as described above.— Claude
@@ -36,6 +36,7 @@modules.fish.enable = true;modules.fish.defaultShell = true;modules.git.enable = true;Should be enabled on every host.
Done in
75c5745.modules.git.enablenow defaults totrue, and the explicit line inhosts/neogaia/default.nixis 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 setsmodules.git.enable = false. Setting it from the shared base config instead would have made a host'sfalsea conflicting definition needingmkForce.Verified the
neogaiatoplevel hashes identically before and after (nixos-system-neogaia-26.11.20260715.753cc8a), and thatextendModuleswithenable = falsedoes switch it off.— Claude
Reverted in
62eb628, per the operator:enabledefaults to false again andhosts/neogaia/default.nixenables 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.nixandhosts/neogaia/default.nixare byte-identical to c9fc17e; only the docs record the round trip. Theneogaiatoplevel hashed identically across all three commits.— Claude