diff --git a/schema/app/containerudev/templates.cue b/app/containerudev/templates.cue similarity index 100% rename from schema/app/containerudev/templates.cue rename to app/containerudev/templates.cue diff --git a/schema/app/nut/collectd.cue b/app/nut/collectd.cue similarity index 76% rename from schema/app/nut/collectd.cue rename to app/nut/collectd.cue index cf9b50d..bd4cfb8 100644 --- a/schema/app/nut/collectd.cue +++ b/app/nut/collectd.cue @@ -1,10 +1,5 @@ package nut -#CollectdNut: { - ups: [...string] - load_plugin: bool | *true -} - collectd: { templates: [ { diff --git a/app/nut/schema/collectd.cue b/app/nut/schema/collectd.cue new file mode 100644 index 0000000..c3d102f --- /dev/null +++ b/app/nut/schema/collectd.cue @@ -0,0 +1,6 @@ +package schema + +#CollectdNut: { + ups: [...string] + load_plugin: bool | *true +} diff --git a/schema/app/nut/nut.cue b/app/nut/schema/schema.cue similarity index 97% rename from schema/app/nut/nut.cue rename to app/nut/schema/schema.cue index c6a6ca9..0b52123 100644 --- a/schema/app/nut/nut.cue +++ b/app/nut/schema/schema.cue @@ -1,4 +1,4 @@ -package nut +package schema #Ups: { driver: string diff --git a/schema/app/nut/templates.cue b/app/nut/templates.cue similarity index 95% rename from schema/app/nut/templates.cue rename to app/nut/templates.cue index 373161d..95d761d 100644 --- a/schema/app/nut/templates.cue +++ b/app/nut/templates.cue @@ -1,6 +1,6 @@ package nut -import "du5t1n.me/cfg/schema/app/containerudev" +import "du5t1n.me/cfg/app/containerudev" templates: containerudev.templates + [ { diff --git a/schema/instructions/instructions.cue b/base/schema/instructions/instructions.cue similarity index 100% rename from schema/instructions/instructions.cue rename to base/schema/instructions/instructions.cue diff --git a/env/prod/nut.cue b/env/prod/nut.cue index 8ae03d9..c13318d 100644 --- a/env/prod/nut.cue +++ b/env/prod/nut.cue @@ -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"}] } diff --git a/instructions/nut0.pyrocufflink.blue.cue b/instructions/nut0.pyrocufflink.blue.cue index 2f0fa8a..22d0845 100644 --- a/instructions/nut0.pyrocufflink.blue.cue +++ b/instructions/nut0.pyrocufflink.blue.cue @@ -1,7 +1,7 @@ package nut0 import ( - "du5t1n.me/cfg/schema/app/nut" + "du5t1n.me/cfg/app/nut" ) render: nut.templates + nut.collectd.templates