I've been using chezmoi too and this is the only feature I miss. It'd be interesting to know what solutions folks are using. Chezmoi has some discussions around it, mostly recommending to use run scripts.
https://github.com/k4j8/filetailor
One thing I like about filetailor I didn't see in Chezmoi was the ability to surround code with a comment specifying which machines it should be commented/uncommented for. It's easier than templates in some situations.
It works great, but there's probably tons of bugs that occur when used by someone other than me. I don't have a CS background and this was my first big hobby project.
For an example, see https://github.com/felipecrs/dotfiles:
The `home` directory contains home directory files.
The `root` directory contains root directory files (e.g `/etc`).