Skip to content

docs(rfc): record org nix dev-environment strategy (activation / shell-definition / local-services) #794

Closed

Description

@c-vigo

Source: exo-fleet#76 comment thread (devenv→mkShell port) + a request to record the org-wide strategy. Deferred/sequenced as a docs ADR, sibling to #775 (uv2nix) and #787 (secrets).

Context

exo-fleet #76 ports its devShell off cachix/devenv to plain pkgs.mkShell to kill a ~165s cold-eval IFD tax. A comment there broadens the question to compare devenv / devshell / mkshell / direnv. That phrasing is a category error — it conflates three separable axes:

  1. Activation — nix-direnv (auto on cd, GC-rooted) vs manual nix develop. Complementary, not exclusive.
  2. Shell definition — pkgs.mkShell vs numtide/devshell vs cachix/devenv. Mutually exclusive per repo.
  3. Local services / processes — devenv up-style MinIO/Postgres orchestration, which devenv bundles into axis 2 (the source of the confusion).

This repo has already largely decided axes 1–2: install.sh --mode devcontainer|direnv|both already ships the dual-mode delivery; mkProjectShell (flake.nix:159-263) is plain pkgs.mkShell; the image is built from the same devTools SSoT with a parity test (devShellTools, flake.nix:400/450) that devshell/devenv would interpose on. Issue #27 ("Adopt Nix/devenv") is already Superseded by the flake-SSoT epic (#625/#631/#637). The hooks axis is mid-convergence: this repo → git-hooks.nix + prek (#778/#791), exo-fleet #76 → git-hooks.nix too.

Goal

Produce docs/rfcs/ADR-nix-devenv-strategy.md that (a) names the three axes and why the four-way question is a category error, (b) ratifies pkgs.mkShell (via mkProjectShell) + nix-direnv on axes 1–2 with the parity-SSoT + IFD reasoning, and (c) adopts process-compose + services-flake as the org default for axis 3 (local services), with a shared-helper implementation tracked as a follow-up.

Scope & non-goals

  • Non-goal: build the shared mkProjectServices helper here — separate follow-up feature issue.
  • Non-goal: mandate anything on exo-pet/exoma repos. This ADR is authoritative for vig-os and a recommendation to siblings.
  • Non-goal: re-run the exo-fleet timing as a spike — cite chore: sync main into dev #76's measured numbers.

Deliverables

  • docs/rfcs/ADR-nix-devenv-strategy.md in the house style of docs/rfcs/ADR-uv2nix-pyproject-nix.md.
  • A cross-link paragraph in docs/NIX.md.
  • A follow-up feature issue for the mkProjectServices helper, linked from the ADR.

Acceptance criteria

Refs #76

Activity

  1. added
    docs
    area:workflow
    effort:medium
    on Jul 1, 2026
  2. c-vigo commented on Jul 1, 2026

    @c-vigo
    ContributorAuthor

    Resolved on dev by PR #796 (docs: record org nix dev-environment strategy ADR). The activation / shell-definition / local-services strategy is recorded as an ADR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workflowdocseffort:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions