gunk-dev/the-valley

host.cue

source9ea588cfdefamain's published tip history
1.7 KiB
1// A worked valley host declaration: one project with a publication mirror,
2// in a group, and a backup. This file is the single domain input: the NixOS
3// module validates it against schema/valley.cue and provisions the host
4// from it. Machines never redefine what is declared here.
5//
6// Validate: cue vet -c schema/valley.cue examples/host.cue
7// Export: cue export schema/valley.cue examples/host.cue
8package valley
9
10projects: {
11 // The project (archive/design/user-scenarios.md § S1), with a
12 // publication mirror: every push to the primary replicates main and
13 // the tags there, best-effort.
14 // Topic branches awaiting review stay on the primary (dcr-24d62f7).
15 //
16 // git.enable defaults to true — git is the only store type today.
17 "the-valley": {
18 mirrors: ["git@mirror.example.org:the-valley.git"]
19
20 // Its group, by the group's identifier, so its web URLs open
21 // /valley/the-valley/…: the group's name, then the project's web
22 // name, which is its identifier because it gives no other. Its
23 // short alias makes /the-valley/… redirect there.
24 group: "valley"
25 aliases: ["the-valley"]
26 }
27}
28
29// The groups, each under an identifier that never changes. A group's name
30// opens its projects' web URLs. Renaming the group keeps the former name
31// among its aliases, which redirect to the name.
32groups: valley: name: "valley"
33
34// The durability policy (dcr-d7952bc): nightly encrypted restic
35// snapshots of the host's data to an sftp server.
36// cadence and retention take the defaults — nightly, 7 daily / 4 weekly /
37// 6 monthly. The repository URL, credentials, and pinned host key are
38// machine integration, supplied by the consumer to the installer
39// (services.valley.backup.*), never declared here.
40backup: {
41 target: "restic-sftp"
42}