feat(home/ai): install the atomic coding agent - #2728
Merged
Conversation
pkgs/by-name/atomic packages the derivation but nothing installed it, so atomic never reached any user environment. Add a homeManager.ai aggregate member following the tuicr shape: atomic ships no upstream home-manager module, so the module declares options.programs.atomic itself and is self-enabling with lib.mkDefault. The package is local to this repository rather than sourced from a flake input, and pkgs/by-name derivations reach machine and home-manager pkgs through flake.overlays.default (modules/nixpkgs/compose.nix), so lib.mkPackageOption resolves it and no input accessor is needed. No configuration surface is declared; the package wrapper already supplies the runtime tool lookups and suppresses the update check. Verification selected as the checks that cover a new ai aggregate member plus the derivation it pulls in, all on aarch64-darwin: the six home-manager-<user> activationPackage checks (the ai aggregate reaches users through these, and they are the only surface a new member changes), the five structure-* checks over flake shape and aggregate resolution, and package-atomic with package-atomic-test-help. All pass. The wider suite was left out as untouched by this change. Positive install evidence, not merely evaluation: nix build --no-link --print-out-paths .#darwinConfigurations.stibnite.system nix-store -q --requisites <result> | grep -- -atomic Before: 2805 requisites, no match. After: 2806 requisites, matching /nix/store/8p7x1hnzs7h671rpd84gqskphqbd49ar-atomic-0.9.13, reached via home-manager-path/bin/atomic. x86_64-linux and aarch64-linux are evaluation-verified only; neither remote builder was reachable from this session.
Review feedback: the header editorialized. Three of its four paragraphs restated the code (that the module declares its own options is visible in the options block; that it is self-enabling is visible in `enable = lib.mkDefault true`; that no configuration surface exists is visible in its absence) or narrated the decision process by comparing the module to its siblings. What survives is the one thing a reader cannot recover from this file: why lib.mkPackageOption resolves a pkgs/by-name derivation, since every other llm-agents-sourced member of this aggregate uses an input accessor and tuicr's header explicitly warns against mkPackageOption. Comment-only change to the module. Re-verified rather than assumed, because the flake source is itself an input and the darwin-system store path moves with it: the same 14 aarch64-darwin checks pass, and the rebuilt system /nix/store/f9hjkfd244sadmbxkh31jrkgf7fdacng-darwin-system-26.11.15abb8c still carries 2806 requisites including atomic-0.9.13.
cameronraysmith
marked this pull request as ready for review
August 16, 2026 23:17
Merge Queue Status
This pull request spent 27 seconds in the queue, including 5 seconds running CI. Required conditions to merge
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #2727, not a revision of it.
#2727 added the derivation at
pkgs/by-name/atomic/, which builds correctly, but nothing in the repo installed it.Packaging and installing are separate steps here and only the first was done, which is why atomic never appeared in an activation diff.
This is the second step.
What changed
modules/home/ai/atomic/default.nixcontributes to theflake.modules.homeManager.aiaggregate.It follows the tuicr shape rather than the hunk shape: atomic ships no upstream home-manager, nixos, or darwin module, so the module declares
options.programs.atomicitself and is self-enabling, with the enable flag defined vialib.mkDefaultso a machine or user module can disable it without a definition collision.The one difference from tuicr is the package accessor.
tuicr's package comes from the
llm-agentsflake input, so it declares a plainlib.mkOptionand explicitly avoidslib.mkPackageOption.atomic is local to this repository, and
pkgs/by-namederivations reach machine and home-managerpkgsthroughflake.overlays.default, which merges the perSystem packages set into the overlay chain (modules/nixpkgs/compose.nix:31-39, wired into machines bymodules/nixpkgs/base-defaults.nix).lib.mkPackageOption pkgs "atomic" { }therefore resolves the local derivation directly, and the same accessor is already in use for local packages elsewhere in this aggregate (modules/home/ai/firstmate/default.nix).Scope is install-only.
No configuration surface is declared: the wrapper in
pkgs/by-name/atomic/package.nixalready supplies the runtime tool lookups and suppresses the update check, and that package'stests.helpexercises the finished store path against nothing but a writable$HOME.pkgs/by-name/atomic/is unmodified; installing it exposed no defect in the derivation.Positive evidence that atomic is actually installed
Evaluation success is not the criterion here, since #2727 evaluated fine and installed nothing.
The darwin system closure for this host was built before and after the change and its requisites compared.
Before (the new module untracked, so outside the flake source):
After:
Reached through the user environment, not merely present as a transitive input:
Build only. Nothing was activated: no
darwin-rebuild switch, noactivate.Checks run and why that selection
The narrowest selection that would still fail if this change were wrong is the set covering a new
homeManager.aiaggregate member plus the derivation it pulls in. All onaarch64-darwin, all pass:The six
home-manager-<user>checks are the activationPackage build-realization checks frommodules/checks/home.nix; the ai aggregate reaches users only through those, so a broken member fails there.The
structure-*checks frommodules/checks/structure/cover flake shape and aggregate resolution, which is what adding an aggregate member perturbs.package-atomicandpackage-atomic-test-helpcome frommodules/checks/packages.nixand cover the derivation this module now depends on.Deliberately left out: the rest of the suite (devshells, containers, security, nixidy, performance, the other packages), which this change does not touch.
Platforms not verified
x86_64-linuxandaarch64-linuxare evaluation-verified only.nix eval .#checks.<system>.home-manager-crs58.drvPathresolves on both, so the module wires up without type or accessor errors there, but neither closure was built:ssh-ng://rosetta-builderrefused the connection (the builder VM is not running) andssh-ng://builder@magnetitecould not read its key (/run/secrets/vars/per-machine/stibnite/nix-remote-build/key, root-only) from this session.Treat the two linux platforms as unbuilt here; CI covers them.
x86_64-darwinis not a concern: this flake's system set isaarch64-darwin,aarch64-linux,x86_64-linux, all three of whichpkgs/by-name/atomicsupports, so itsplatform == nullbranch is never taken andpkgs.atomicis nevernullin any evaluated configuration.What determines the installed config on stibnite
Asked in review; answered by evaluation rather than by reading the module.
just activate --askon this host resolves tojust activate-darwin stibnite --ask(justfile:75-90), which runsnix run .#darwin -- stibnite . --ask, which execsnh darwin switch . -H stibnite --accept-flake-config --ask(modules/darwin/app.nix:80). That builds.#darwinConfigurations.stibnite.system— the exact attribute built above — and--askprompts before applying, so the diff it shows is the diff between your current system and that store path.The chain that puts atomic in it:
crs58is the only home-manager user on stibnite, and itsaggregateslist includesai(modules/home/users/crs58/meta.nix:16-26), so this module is imported into that home configuration. Nothing else in the repo definesprograms.atomic, so the only definition ofenableis this module'slib.mkDefault trueat priority 1000; it evaluates totrue, and a machine or user module can still override it at normal priority without a collision.packageresolves throughlib.mkPackageOption pkgs "atomic"toatomic-0.9.13, the localpkgs/by-name/atomicderivation reached viaflake.overlays.default.The observable end of that chain is
home-manager-path/bin/atomic, shown above as a requisite of the built system. On--askit appears as an addition in the nvd diff, which is what did not happen for #2727.One precision worth stating: the darwin-system store path moves with the flake source, so the second review round's comment-only edit changed it from
xm229fpr1s31b9gqn41xb2b9v5vz88vntof9hjkfd244sadmbxkh31jrkgf7fdacng. The requisite count (2806) and the atomic store path (8p7x1hnzs7h671rpd84gqskphqbd49ar-atomic-0.9.13) are identical across both.Review round 1
7bd1631. Three of the four paragraphs restated the code — that the module declares its own options, that it is self-enabling, that no configuration surface exists — or narrated the choice by comparing to sibling modules. What remains is the accessor rationale, which a reader cannot recover from this file given that every llm-agents-sourced sibling uses an input accessor and tuicr's own header warns againstmkPackageOption.Both were re-verified after the trim rather than assumed: the same 14 checks pass and the rebuilt system still carries atomic.
Draft on purpose
Opened as a draft so Mergify's queue does not pick it up before review. Mark ready when you have reviewed it.