templating with include_template of an encrypted file #4677
-
I'm using a template to conditionally pull in (and decrypt) a source file, e.g. I believe the template parsing is run before the decrypt, as my template variables aren't be interpreted. In the encrypted personal_config file, I have a line I've read through the discussions here (and there's a ton of good content I've learned from!), but didn't find anything about encrypted .chezmoitemplates files. What's the right way to approach this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
If the comment in this discussion thread is correct, this isn't currently possible. |
Beta Was this translation helpful? Give feedback.
-
That is correct. Note that chemzoi does support encrypted templates, for example a file At the moment, I don't think there's a way to use encrypted templates in |
Beta Was this translation helpful? Give feedback.
That is correct.
includeTemplate
reads and parses the file as a template, so in your example it is parsed as a template before being passed todecrypt
.Note that chemzoi does support encrypted templates, for example a file
encrypted_dot_foo.tmpl
in your source directory will be decrypted then executed as a template, and finally used to populate.foo
.At the moment, I don't think there's a way to use encrypted templates in
.chezmoitemplates
.