feat(nix): check the home-manager module's composition (task 0047) #56
Reference in New Issue
Block a user
Delete Branch "task-0047-flake-check-hm-module-composition"
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/0047-flake-check-hm-module-composition.mdSummary
Adds the first automated proof of the home-manager module's composition (ADR 0021), so a change in home-manager or the Claude Code module that breaks how the Skill is declared fails
nix flake checkrather than a maintainer rebuild.home-managerflake input, its nixpkgs following this flake's, so the module is checked against the same nixpkgs-and-home-manager pairing a consumer following this flake would get.flake.lockupdated.home-manager-modulecheck underchecks, inchecks/home-manager-module.nix, evaluating the real module through home-manager's standalone entry point and buildingconfig.home-filesunder four operator configurations, asserting on the file tree each produces:Building the home files derivation needs neither the Claude Code binary nor a running agent. The check reuses the package check's store path rather than rebuilding.
No deviations from the plan.
nix flake checkpasses on the host system (and omits the incompatibleaarch64-*systems by default, identical to the pre-existing package check).Review
Risk
Overall: Low
homeFileshelper with four cases.Unaddressed findings
None. The one actionable finding both the Standards and Spec axes raised — the merged-hook assertion coupling to the JSON emitter's colon spacing (
"command": "gitea-axi") — was fixed in the diff by matching the quoted JSON string values instead. All other axis findings were judgement calls assessed as acceptable (self-contained per-scenarioenable = truelines for readability; the IFD cross-system caveat, which mirrors the existing package check).