gunk-dev/the-valley

host.cue

sourcee5e09626b3e3main's published tip history
1.6 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/…. Its short alias makes /the-valley/…
22 // redirect there.
23 group: "valley"
24 aliases: ["the-valley"]
25 }
26}
27
28// The groups, each under an identifier that never changes. A group's name
29// opens its projects' web URLs. Renaming the group keeps the former name
30// among its aliases, which redirect to the name.
31groups: valley: name: "valley"
32
33// The durability policy (dcr-d7952bc): nightly encrypted restic
34// snapshots of the host's data to an sftp server.
35// cadence and retention take the defaults — nightly, 7 daily / 4 weekly /
36// 6 monthly. The repository URL, credentials, and pinned host key are
37// machine integration, supplied by the consumer to the installer
38// (services.valley.backup.*), never declared here.
39backup: {
40 target: "restic-sftp"
41}