gunk-dev/the-valley

dcr-0f5d9b1-cue-config-host-module.md

source87ce0621d5ddmain's published tip history
2.0 KiB · Rendered
1---
2type: decision
3id: dcr-0f5d9b1
4status: decided
5title: "Define host configuration in CUE and ship the host module from the-valley"
6created: 2026-07-06
7---
8
9# Define host configuration in CUE and ship the host module from the-valley
10
11The-valley owns the reusable host module and the CUE schema that describes its configuration. A
12deployment enables that module and supplies the machine-specific settings.
13
14The flake exports the implementation as `nixosModules.valley-host`. Consumers such as cosmo
15configure its data directory, Unix user, SSH keys, and other host integration. Keeping the module
16here lets deployments share the same definition of a valley host.
17
18CUE is the canonical configuration format. The domain model must be usable by tools that do not run
19Nix. The NixOS module validates and exports the CUE at build time; where Nix needs the resulting
20data, 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
23Configuration declares projects. A project's Git store is a nested field in that declaration. The
24current 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
28Projects can declare push mirrors. Mirroring is best-effort and propagates deletions within the
29declared publication scope. [[dcr-24d62f7]](dcr-24d62f7-publication-mirror-not-review-queue.md)
30defines that scope as `main` and tags. [[oc-9949561]](../outcomes/oc-9949561-push-replication.md)
31covers the replication outcome.
32
33Access controls must correspond to an enforceable boundary. A single Git user with unrestricted
34git-shell cannot enforce per-project permissions. The access model and its forced-command
35enforcement 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).