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:
2026-07-20 10:53:47 -04:00
parent 0d685ce277
commit c9fc17ecf5
4 changed files with 54 additions and 8 deletions

25
modules/git.nix Normal file
View File

@@ -0,0 +1,25 @@
{
config,
lib,
...
}:
# git for the primary user, configured through home-manager.
let
cfg = config.modules.git;
user = config.user.name;
in
{
options.modules.git.enable =
lib.mkEnableOption "git for the primary user, carrying the operator's commit identity";
config = lib.mkIf cfg.enable {
home-manager.users.${user}.programs.git = {
enable = true;
# Git will not guess a name and address from the login and hostname.
# Without these a commit fails outright with `Author identity unknown`.
settings.user.name = "alexion";
settings.user.email = "contact@alexion.dev";
};
};
}