| 1 | --- |
| 2 | type: idea |
| 3 | id: ida-b9f646c |
| 4 | status: adopted |
| 5 | title: "Keep schemas portable while using Nix as the reference implementation" |
| 6 | created: 2026-07-06 |
| 7 | source: conversation, 2026-07-06 |
| 8 | --- |
| 9 | |
| 10 | # Keep schemas portable while using Nix as the reference implementation |
| 11 | |
| 12 | The schemas and behavioral contracts should remain implementable on ordinary Linux systems. Nix |
| 13 | provides the reference implementation; additional installers and runners should be built when a |
| 14 | concrete deployment needs them. |
| 15 | |
| 16 | The hosting module manages familiar components such as Unix users, SSH, bare repositories, and |
| 17 | hooks. Another installer can consume [schema/valley.cue](../../schema/valley.cue) and provide those |
| 18 | components. |
| 19 | |
| 20 | Events and knowledge records also need no Nix-specific storage or transport. |
| 21 | |
| 22 | ## Verification |
| 23 | |
| 24 | Verification needs particular care because the reference runner uses Nix derivations. The |
| 25 | attestation contract must still state which check ran, the subject, and the result in terms another |
| 26 | runner can represent. |
| 27 | |
| 28 | Purity is a property claimed and enforced through a runner's execution model. Merely naming a runner |
| 29 | does not make arbitrary computation pure. [verification.md](../../design/verification.md) describes |
| 30 | the distinction. |
| 31 | |
| 32 | A useful review question is whether a small program on a conventional Linux distribution could |
| 33 | produce or consume each schema field. Fields that only the reference implementation can supply need |
| 34 | justification. |
| 35 | |
| 36 | ## When to add a backend |
| 37 | |
| 38 | A second runner is needed when a real check requires it. A non-NixOS installer is needed when a |
| 39 | deployment requires it. |
| 40 | |
| 41 | Keeping the contract portable now should make those additions possible without prematurely |
| 42 | maintaining implementations that no one uses. |
| 43 | |
| 44 | [[ida-1ec03b1]](ida-1ec03b1-path-scoped-verification-policy.md) describes how policy selects checks |
| 45 | independently of the contributor's execution environment. |