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