gunk-dev/the-valley

ida-b9f646c-nix-backend-not-substrate.md

sourcecb8333eba86amain's published tip history
2.0 KiB · Rendered
1---
2type: idea
3id: ida-b9f646c
4status: adopted
5title: Nix is a backend, not the substrate — schemas must stay portable to typical Linux
6created: 2026-07-06
7source: conversation, 2026-07-06
8---
9
10# Nix is a backend, not the substrate
11
12The guidance: target non-Nix systems at a reasonable moment so no assumption gets baked in that is
13hard to port to typical Linux. The discipline that makes the moment cheap: **portable schemas from
14day 0, portable implementations on demand.**
15
16Where 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
28Review heuristic: every schema must be implementable by a shell script on Debian. A field only Nix
29can produce is a leak.
30
31The forced moments arrive on their own: a second runner kind when the Phase 2 attest helper is
32designed; a non-NixOS installer the first time a machine the operator doesn't control hosts a
33valley. Building either sooner is the premature-generality trap.
34
35Follow-up (PR-class, after the requirements rewrite lands): the README constraint "Nix-native —
36builds, verification, and artifacts _are_ derivations" states an identity; reframe it as
37reference-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.