Repository navigation
devenv image: adopt devenv 2.x and revisit size, startup, and generation #418
Description
Context
Follow-up from GSA-TTS/agentic-coding-quickstart#474's review of the agent-kits-on-devenv ADR. This issue is scoped to the generic devenv image in integrations/isolation/images/devenv/ (added in GSA-TTS/agentic-coding-patterns#395).
It deliberately does not cover making acq depend more directly on devenv, or collapsing the image variant matrix — those are part of the broader ADR discussion. This issue is about improving how the image is generated and used.
Current state
DockerfilepinsNIXPKGS_REV=ac62194c3917d5f474c1a844b6fd6da2db95077d(nixos-25.05) and installer0.27.0;VERSIONis1.0.0.- That pin resolves to devenv 1.11.2. devenv 2.x is present in neither
nixos-25.05nornixos-25.11; it first appears innixos-26.05(2.1.2) andnixpkgs-unstable(2.2 / 2.3).
Improvements
-
[DONE] Toolchain currency. Move
NIXPKGS_REVtonixos-26.05ornixpkgs-unstable, record the devenv major as part of the image contract, and bumpVERSIONwith the change. Verify the image's single-user Nix (from installer0.27.0) against devenv 2.x, which bundles its own Nix fork (therelease-26.05devenv package pinsdevenvNixVersion = "2.34"). -
Size and startup. Newer nixpkgs brings the ELF-note loader cache, and the devenv closure shrank from 528 MB to 376 MB with a bundled Nix 2.35.2. Measure the image before/after and consider a statically linked devenv (~16 ms startup, ~82 MB) only if startup cost is a measured problem. Adopt devenv 2.3's
max_closure_sizetest limit to keep a budget enforced in CI. -
Generation model (optional). Evaluate single-sourcing the toolchain through a declarative
devenv.nixand deriving the image withdevenv container build shell(subcommand form;copyToRoot,startupCommand,config.container.isBuilding). Caveats to validate: it needsnix2containerandmk-shell-bininputs, a Linux builder when run on macOS, and it starts the environment rather than producing a sandbox base (theagentuser, no-init, writable prefix) — so treat it as an addition, not a drop-in replacement. -
Persistence docs. Document that
.devenvholds the evaluation cache and detached process-manager state and should be backed by a kit-declared volume for repeat commands anddevenv up -d. Note devenv 2.2's SQLite-cache-on-virtiofs fix, which applies to msb/sbx mounts. -
Devenv 2.x behavior notes for consumers. Activation keys on
devenv.nix(notdevenv.yaml);devenv initno longer writes.envrcby default;devenv buildemits JSON; thegit-hooksinput is no longer included by default;pre-commitis nowprek;devenv container --copybecamedevenv container copy. No existing kit uses devenv, so this is documentation only. -
Keep as-is. The no-baked-proxy-CA default, the checksum-pinned Nix installer, the immutable version tags, and the multi-arch (amd64 + arm64) manifest.
Out of scope
- Any change to how
acqdepends on devenv. - Removing or collapsing the
devenv-opencodevariant (that decision belongs to the ADR discussion).
Verification
- Rebuild and smoke-test:
devenv --versionreports the intended major,direnvis present, a non-interactivebash -c 'devenv version'works, and theagentuser contract is unchanged. make validate, and a CIdevenv-image.ymlrun that publishes a new immutableVERSION.
Refs
- GSA-TTS/agentic-coding-quickstart#474 — ADR review this follows from
- GSA-TTS/agentic-coding-patterns#395 — the image this covers
Activity
mogul commentedon Sep 16, 2026
@basiliskus are you willing to take this on? I'd push through with it myself, but I am wary of disrupting your team's workflow, since you're the only existing consumer so far.
mogul commentedon Sep 16, 2026
(Note the announcement blog post's 2.x migration guidance.)
basiliskus commentedon Sep 16, 2026
Right, the problem is that we're stuck ATM with devenv 1.x because of a limitation with our gitlab pipeline. As long as we're versioning the image and acq maintains backwards compatibility, it should be ok. I can take it to make sure it works with our setup
mogul commentedon Oct 6, 2026
@basiliskus any plans to move this one forward? I'd like to ensure that if we provide devenv that it's up to date, but I need to rely on your expertise to get there even if you're content with a SHA that only includes 1.x.
basiliskus commentedon Oct 6, 2026
I'll get started
basiliskus commentedon Oct 6, 2026
Progress on item 1 (toolchain currency): #480 moves
NIXPKGS_REVtonixos-26.05(devenv 2.1.2) withVERSION2.0.0, and records the devenv major as part of the image contract.Verified so far: a feature-branch build of all four legs; in an msb sandbox from the arm64 digest,
devenv versionreports 2.1.2, the installer's Nix 2.24 and devenv's bundled Nix 2.34 share the single-user store DB correctly (outputs registered,nix store verifyclean, no writable store outputs), and fetches through a kit-provided CA work via the bundled Nix. Against two consuming repos still locked to 1.x modules: one passes unchanged; one usinggit-hooks.hooksfails until thegit-hooksinput is declared explicitly, which also stops thedevenv.lockchurn between 1.x and 2.x CLIs (2.x drops the implicitgit-hooks/pre-commit-hooks/flake-compatnodes; 1.x re-adds them at HEAD)..devenv/is reusable across majors.Not yet verified: the
devenv updatepath to 2.x modules (prek, native process manager), anddevenv processes downleft Postgres children running after a 30s SIGKILL in one run. A post-build smoke-test job (fixture withgit-hooks,direnv exec . true, store-permission check) would make the image-level checks repeatable in CI; proposing that as a follow-up. Items 2–4 (size/startup, container generation, persistence docs) remain open.basiliskus commentedon Oct 6, 2026
@mogul PR is ready to review: #480
mogul commentedon Oct 7, 2026
LOL
feat(devenv-image): move to nixos-26.05 (devenv 2.1.2), VERSION 2.0.0 (…
mogul commentedon Oct 15, 2026
#480 merged, which addresses the upgrade to devenv 2.x.
We still have these to tackle.
devenv.nix/devenv container build shellgeneration path..devenvstate and determine the proper kit-declared volume model, including the newer virtiofs SQLite-cache behavior.wz-gsa commentedon Oct 15, 2026