dotter
dotter copied to clipboard
Conditional include based on OS
Environment
If applicable, provide the following details:
- OS: Windows 11 with Ubuntu and NixOS on WSL2
- Dotter version: 0.13.0
The question
Since I have the same hostname on Windows and WSL, I'm trying to work out how to conditionally include the windows.toml only when running in Windows. This would be the first step in having it only install the Windows Terminal configuration files when run from Windows and ignore it when from any WSL2 distro.
I've tried using the following in the hostname toml file, and it didn't work, as it doesn't seem to like templating at that level. Any suggestions?
{{#if (eq dotter.os windows)}}includes = [".dotter/windows.toml"]{{/if}}
packages = ["windowsterminalpreview"]