From cf5a2f46f0167c8495d28de5b1364c8bc460b6d0 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Fri, 19 Jun 2026 17:57:23 +0100 Subject: Migrate VM dotfiles to chezmoi 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. --- run_onchange_after_deploy-etc.sh.tmpl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'run_onchange_after_deploy-etc.sh.tmpl') 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 }} -- cgit v1.3.1