| 1 | --- |
| 2 | type: idea |
| 3 | id: ida-b9f646c |
| 4 | status: adopted |
| 5 | title: Nix is a backend, not the substrate — schemas must stay portable to typical Linux |
| 6 | created: 2026-07-06 |
| 7 | source: conversation, 2026-07-06 |
| 8 | --- |
| 9 | |
| 10 | # Nix is a backend, not the substrate |
| 11 | |
| 12 | The guidance: target non-Nix systems at a reasonable moment so no assumption gets baked in that is |
| 13 | hard to port to typical Linux. The discipline that makes the moment cheap: **portable schemas from |
| 14 | day 0, portable implementations on demand.** |
| 15 | |
| 16 | Where Nix is actually load-bearing today: |
| 17 | |
| 18 | - **Hosting** — not coupled. The host module's work (git user, git-shell, bare repos, hooks) is |
| 19 | plain POSIX; the NixOS module is a _reference installer_ consuming |
| 20 | [valley.cue](../../../schema/valley.cue). Another installer can consume the same file. |
| 21 | - **Events, knowledge** — not coupled. |
| 22 | - **Verification** — the junction. Checks-as-derivations is the reference implementation, not the |
| 23 | contract: the attestation schema must record _what check ran, on what tree, what result_, with |
| 24 | **purity as a claim tied to a runner kind** (`nix` claims purity strongly; a `plain`/`oci` runner |
| 25 | claims less). If derivation-ness leaks into the schema, non-Nix support becomes a migration |
| 26 | instead of an added backend. |
| 27 | |
| 28 | Review heuristic: every schema must be implementable by a shell script on Debian. A field only Nix |
| 29 | can produce is a leak. |
| 30 | |
| 31 | The forced moments arrive on their own: a second runner kind when the Phase 2 attest helper is |
| 32 | designed; a non-NixOS installer the first time a machine the operator doesn't control hosts a |
| 33 | valley. Building either sooner is the premature-generality trap. |
| 34 | |
| 35 | Follow-up (PR-class, after the requirements rewrite lands): the README constraint "Nix-native — |
| 36 | builds, verification, and artifacts _are_ derivations" states an identity; reframe it as |
| 37 | reference-implementation-not-contract, and align [verification.md](../../design/verification.md). |
| 38 | |
| 39 | ## Related |
| 40 | |
| 41 | - [[ida-1ec03b1]] — path-scoped verification policy; the runner-kind claim is what its per-class |
| 42 | attestations are made of. |