aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/run_onchange_after_deploy-etc.sh.tmpl
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-06-19 17:57:23 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-06-19 17:57:23 +0100
commitcf5a2f46f0167c8495d28de5b1364c8bc460b6d0 (patch)
tree9c46279f71aab9757abef8af927a75b198690bf3 /run_onchange_after_deploy-etc.sh.tmpl
parent259a3b989513f47f6cc5d36eaaf9e5fbef9b4d9a (diff)
downloaddotfiles-cf5a2f46f0167c8495d28de5b1364c8bc460b6d0.tar.gz
dotfiles-cf5a2f46f0167c8495d28de5b1364c8bc460b6d0.tar.bz2
dotfiles-cf5a2f46f0167c8495d28de5b1364c8bc460b6d0.zip
Migrate VM dotfiles to chezmoiHEADmaster
Move VM dotfile deployment out of Home Manager and into chezmoi with a machineRole guard. Add VM recipes for applying chezmoi state and restarting the Nix GnuPG agent. Make host-only hooks no-op on the VM and render container storage per role.
Diffstat (limited to 'run_onchange_after_deploy-etc.sh.tmpl')
-rwxr-xr-xrun_onchange_after_deploy-etc.sh.tmpl8
1 files changed, 8 insertions, 0 deletions
diff --git a/run_onchange_after_deploy-etc.sh.tmpl b/run_onchange_after_deploy-etc.sh.tmpl
index 5f97c70..45e5c26 100755
--- a/run_onchange_after_deploy-etc.sh.tmpl
+++ b/run_onchange_after_deploy-etc.sh.tmpl
@@ -1,3 +1,5 @@
+{{- $machineRole := default "host" (index . "machineRole") -}}
+{{- if eq $machineRole "host" -}}
#!/usr/bin/env dash
# Deploy system-level configs from etc/ to /etc/.
# chezmoi re-runs this script whenever any file under etc/ changes.
@@ -64,3 +66,9 @@ target=$(readlink /usr/local/bin/sudo 2>/dev/null || true)
if [ "$target" = /usr/bin/sudo-rs ]; then
sudo rm -f /usr/local/bin/sudo
fi
+{{- else -}}
+#!/usr/bin/env dash
+# /etc deployment is host-only.
+set -eu
+exit 0
+{{- end }}