aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.chezmoi.toml.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 /.chezmoi.toml.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 '.chezmoi.toml.tmpl')
-rw-r--r--.chezmoi.toml.tmpl6
1 files changed, 6 insertions, 0 deletions
diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl
index f7b1156..3582b7e 100644
--- a/.chezmoi.toml.tmpl
+++ b/.chezmoi.toml.tmpl
@@ -1,3 +1,5 @@
+{{- $defaultMachineRole := default "host" (env "CHEZMOI_MACHINE_ROLE") -}}
+{{- $machineRole := promptStringOnce . "machineRole" "Machine role (host or vm)" $defaultMachineRole -}}
sourceDir = {{ .chezmoi.sourceDir | quote }}
[status]
@@ -7,7 +9,11 @@ sourceDir = {{ .chezmoi.sourceDir | quote }}
exclude = ["scripts"]
[data]
+ # Machine role used by templates and run hooks. Valid values: "host", "vm".
+ machineRole = {{ $machineRole | quote }}
+{{- if eq $machineRole "host" }}
# Block device holding the LUKS-encrypted root, without the /dev/ prefix
# (e.g. "nvme0n1p2", "sda2"). Resolved to a UUID at apply time via lsblk,
# used by etc/kernel/cmdline.tmpl.
luksRootPartition = {{ promptStringOnce . "luksRootPartition" "LUKS root partition (e.g. nvme0n1p2)" | quote }}
+{{- end }}