diff options
| author | sommerfeld <sommerfeld@sommerfeld.dev> | 2026-09-17 15:05:36 +0100 |
|---|---|---|
| committer | sommerfeld <sommerfeld@sommerfeld.dev> | 2026-09-17 15:05:36 +0100 |
| commit | aff435a0fb3a56b1d7b738c7dede363440884b3a (patch) | |
| tree | 07acb41d37760aa169ee42dbeb69da3621cc7489 /.chezmoi.toml.tmpl | |
| parent | a7f74c1fa4b89c5829f5896842eb7248c820704c (diff) | |
| download | dotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.tar.gz dotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.tar.bz2 dotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.zip | |
Add the Canonical laptop profile and setup workflows
Diffstat (limited to '.chezmoi.toml.tmpl')
| -rw-r--r-- | .chezmoi.toml.tmpl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl index 3582b7e..781cfbf 100644 --- a/.chezmoi.toml.tmpl +++ b/.chezmoi.toml.tmpl @@ -1,5 +1,8 @@ {{- $defaultMachineRole := default "host" (env "CHEZMOI_MACHINE_ROLE") -}} -{{- $machineRole := promptStringOnce . "machineRole" "Machine role (host or vm)" $defaultMachineRole -}} +{{- $machineRole := promptStringOnce . "machineRole" "Machine role (host, vm, canonical)" $defaultMachineRole -}} +{{- if not (has $machineRole (list "host" "vm" "canonical")) -}} +{{- fail "machineRole must be host, vm, or canonical" -}} +{{- end -}} sourceDir = {{ .chezmoi.sourceDir | quote }} [status] @@ -9,8 +12,12 @@ 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 "canonical" }} + workName = {{ promptStringOnce . "workName" "Work Git name" | quote }} + workEmail = {{ promptStringOnce . "workEmail" "Canonical email address" | quote }} + workSigningKey = {{ promptStringOnce . "workSigningKey" "Work GPG signing key fingerprint" | quote }} +{{- end }} {{- 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, |
