From 44926c944f62429028d780bdf195a3242577cffe Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 15 Jan 2024 17:34:45 -0600 Subject: [PATCH] app/nut: Inherit container udev rules units I missed getting the path and service unit file templates when rewriting from KCL into CUE. --- schema/app/containerudev/templates.cue | 23 +++++++++++++++++++++++ schema/app/nut/templates.cue | 4 +++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 schema/app/containerudev/templates.cue diff --git a/schema/app/containerudev/templates.cue b/schema/app/containerudev/templates.cue new file mode 100644 index 0000000..f7c227e --- /dev/null +++ b/schema/app/containerudev/templates.cue @@ -0,0 +1,23 @@ +package containerudev + +templates: [ + { + template: "common/reload-udev-rules.path" + dest: "/etc/systemd/system/reload-udev-rules.path" + hooks: { + changed: [ + {run: "systemctl daemon-reload"}, + {run: "systemctl try-restart reload-udev-rules.path"} + ] + } + }, + { + template: "common/reload-udev-rules.service" + dest: "/etc/systemd/system/reload-udev-rules.service" + hooks: { + changed: [ + {run: "systemctl daemon-reload"}, + ] + } + } +] diff --git a/schema/app/nut/templates.cue b/schema/app/nut/templates.cue index 038ebaa..373161d 100644 --- a/schema/app/nut/templates.cue +++ b/schema/app/nut/templates.cue @@ -1,6 +1,8 @@ package nut -templates: [ +import "du5t1n.me/cfg/schema/app/containerudev" + +templates: containerudev.templates + [ { template: "nut/nut.sysusers" dest: "/etc/sysusers.d/nut.conf"