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
parent
52642d37d9
commit
41e9fa85d2
|
@ -1,10 +1,5 @@
|
||||||
package nut
|
package nut
|
||||||
|
|
||||||
#CollectdNut: {
|
|
||||||
ups: [...string]
|
|
||||||
load_plugin: bool | *true
|
|
||||||
}
|
|
||||||
|
|
||||||
collectd: {
|
collectd: {
|
||||||
templates: [
|
templates: [
|
||||||
{
|
{
|
|
@ -0,0 +1,6 @@
|
||||||
|
package schema
|
||||||
|
|
||||||
|
#CollectdNut: {
|
||||||
|
ups: [...string]
|
||||||
|
load_plugin: bool | *true
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package nut
|
package schema
|
||||||
|
|
||||||
#Ups: {
|
#Ups: {
|
||||||
driver: string
|
driver: string
|
|
@ -1,6 +1,6 @@
|
||||||
package nut
|
package nut
|
||||||
|
|
||||||
import "du5t1n.me/cfg/schema/app/containerudev"
|
import "du5t1n.me/cfg/app/containerudev"
|
||||||
|
|
||||||
templates: containerudev.templates + [
|
templates: containerudev.templates + [
|
||||||
{
|
{
|
|
@ -1,8 +1,8 @@
|
||||||
package prod
|
package prod
|
||||||
|
|
||||||
import n "du5t1n.me/cfg/schema/app/nut"
|
import "du5t1n.me/cfg/app/nut/schema"
|
||||||
|
|
||||||
nut: n.#Nut & {
|
nut: schema.#Nut & {
|
||||||
listen: {
|
listen: {
|
||||||
address: "::"
|
address: "::"
|
||||||
port: 3493
|
port: 3493
|
||||||
|
@ -58,6 +58,6 @@ nut: n.#Nut & {
|
||||||
|
|
||||||
let _nut = nut
|
let _nut = nut
|
||||||
|
|
||||||
collectd: nut: n.#CollectdNut & {
|
collectd: nut: schema.#CollectdNut & {
|
||||||
ups: [for k, v in _nut.ups {k + "@localhost"}]
|
ups: [for k, v in _nut.ups {k + "@localhost"}]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package nut0
|
package nut0
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"du5t1n.me/cfg/schema/app/nut"
|
"du5t1n.me/cfg/app/nut"
|
||||||
)
|
)
|
||||||
|
|
||||||
render: nut.templates + nut.collectd.templates
|
render: nut.templates + nut.collectd.templates
|
||||||
|
|
Loading…
Reference in New Issue