3 ms·
Yes, you can define your own template variables in the config file, for example if you include: data: category: "linux-server" in your .config/chezmoi/c
by twp 8y ago
Yes, you can define your own template variables in the config file, for example if you include:
data:
category: "linux-server"
in your .config/chezmoi/chezmoi.yaml file, you can then use it in your templates and a .chezmoiignore file (which is also treated as a template). A .chezmoiignore file could look like:
{{ if eq .category "linux-server" -}}
.windowmanager.conf
{{ end -}}
I use this technique myself: https://github.com/twpayne/dotfiles/blob/master/.chezmoiignore https://github.com/twpayne/dotfiles/blob/master/.chezmoiigno...
- RagingCactus 8y agoThanks! Just defining it as a config variable is far too obvious in hindsight, I don't know why it didn't cross my mind. I'll definitely try it out!