gunk-dev/the-valley

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

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