| 1 | --- |
| 2 | type: decision |
| 3 | id: dcr-0f5d9b1 |
| 4 | status: decided |
| 5 | title: "Define host configuration in CUE and ship the host module from the-valley" |
| 6 | created: 2026-07-06 |
| 7 | --- |
| 8 | |
| 9 | # Define host configuration in CUE and ship the host module from the-valley |
| 10 | |
| 11 | The-valley owns the reusable host module and the CUE schema that describes its configuration. A |
| 12 | deployment enables that module and supplies the machine-specific settings. |
| 13 | |
| 14 | The flake exports the implementation as `nixosModules.valley-host`. Consumers such as cosmo |
| 15 | configure its data directory, Unix user, SSH keys, and other host integration. Keeping the module |
| 16 | here lets deployments share the same definition of a valley host. |
| 17 | |
| 18 | CUE is the canonical configuration format. The domain model must be usable by tools that do not run |
| 19 | Nix. The NixOS module validates and exports the CUE at build time; where Nix needs the resulting |
| 20 | data, it reads the exported value. It does not maintain a second schema. Configuration and |
| 21 | [event contracts](../../design/roadmap.md#work-across-phases) use the same schema language. |
| 22 | |
| 23 | Configuration declares projects. A project's Git store is a nested field in that declaration. The |
| 24 | current project boundary is one repository, as specified in |
| 25 | [[dcr-5da1f36]](dcr-5da1f36-project-is-repo.md); possible additional stores are explored in |
| 26 | [[ida-48c8868]](../ideas/ida-48c8868-stores-beyond-git.md). |
| 27 | |
| 28 | Projects can declare push mirrors. Mirroring is best-effort and propagates deletions within the |
| 29 | declared publication scope. [[dcr-24d62f7]](dcr-24d62f7-publication-mirror-not-review-queue.md) |
| 30 | defines that scope as `main` and tags. [[oc-9949561]](../outcomes/oc-9949561-push-replication.md) |
| 31 | covers the replication outcome. |
| 32 | |
| 33 | Access controls must correspond to an enforceable boundary. A single Git user with unrestricted |
| 34 | git-shell cannot enforce per-project permissions. The access model and its forced-command |
| 35 | enforcement are defined in [[dcr-e544f20]](dcr-e544f20-access-is-verbs-on-projects.md) and |
| 36 | [[dcr-b87f6e8]](dcr-b87f6e8-identity-is-a-governed-registry.md). |