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.
This commit is contained in:
@@ -36,9 +36,11 @@ The domain model (Host, Module, Skeleton, Auto-loader, Enable convention, overla
|
||||
Both were true only while the machine still ran CachyOS against a distro Nix daemon.
|
||||
- The substituters a `nix build` fetches from are the **daemon's** (`/etc/nix/nix.conf`), *not* the `nix.settings` of the config being built — those only govern the built system.
|
||||
The two coincide here because the dev host runs this flake; they diverge on any machine that does not.
|
||||
- Git identity is not declared in the flake — there is no `programs.git` — so it must be set by hand before the first commit on a fresh machine.
|
||||
The July 2026 reimage confirmed this: it wiped the hand-written `~/.gitconfig`, and the next commit failed with `Author identity unknown`, auto-detecting `alexion@neogaia.(none)`.
|
||||
It now lives in this checkout's `.git/config`, which reaches no other machine and does not survive the next reimage either; history uses `alexion <contact@alexion.dev>`.
|
||||
- Git identity is declared in the flake by `modules/git.nix`, which writes `alexion <contact@alexion.dev>` — the identity all history uses — on any host enabling `modules.git`.
|
||||
Once such a host has been rebuilt, a checkout on it needs no hand-written identity and keeps one across a reimage.
|
||||
Two things mask a broken module, so neither is evidence it works: this checkout's `.git/config` carries the same identity, and home-manager writes `~/.config/git/config` while a `~/.gitconfig` also exists and outranks it per key.
|
||||
That `~/.gitconfig` holds only a `tea` credential helper and no `user.*`, so it does not shadow the identity today, but it is undeclared and will not survive a reimage.
|
||||
Verify the module by committing in a repository outside this checkout.
|
||||
- The primary build/verify seam for any Host is `nix flake check`, which builds `checks.x86_64-linux.<host>` (the system toplevel); cheap targeted checks use `nix eval .#nixosConfigurations.<host>.config...`.
|
||||
- A flake only sees **git-tracked** files, so a new file that has not been `git add`ed is invisible to evaluation even though it exists on disk.
|
||||
The failure names the path and reads as if the file were missing: `error: Path 'secrets/shared.yaml' does not exist in Git repository`.
|
||||
|
||||
Reference in New Issue
Block a user