Restructure CUE packages

A bunch of stuff that wasn't schema definitions ended up in the `schema`
package.  Rather than split values up in a bunch of top-level packages,
I think it would be better to have a package-per-app model.
master
Dustin 2024-01-17 16:23:49 -06:00
parent 52642d37d9
commit 41e9fa85d2
8 changed files with 12 additions and 11 deletions

View File

@ -1,10 +1,5 @@
package nut
#CollectdNut: {
ups: [...string]
load_plugin: bool | *true
}
collectd: {
templates: [
{

View File

@ -0,0 +1,6 @@
package schema
#CollectdNut: {
ups: [...string]
load_plugin: bool | *true
}

View File

@ -1,4 +1,4 @@
package nut
package schema
#Ups: {
driver: string

View File

@ -1,6 +1,6 @@
package nut
import "du5t1n.me/cfg/schema/app/containerudev"
import "du5t1n.me/cfg/app/containerudev"
templates: containerudev.templates + [
{

6
env/prod/nut.cue vendored
View File

@ -1,8 +1,8 @@
package prod
import n "du5t1n.me/cfg/schema/app/nut"
import "du5t1n.me/cfg/app/nut/schema"
nut: n.#Nut & {
nut: schema.#Nut & {
listen: {
address: "::"
port: 3493
@ -58,6 +58,6 @@ nut: n.#Nut & {
let _nut = nut
collectd: nut: n.#CollectdNut & {
collectd: nut: schema.#CollectdNut & {
ups: [for k, v in _nut.ups {k + "@localhost"}]
}

View File

@ -1,7 +1,7 @@
package nut0
import (
"du5t1n.me/cfg/schema/app/nut"
"du5t1n.me/cfg/app/nut"
)
render: nut.templates + nut.collectd.templates