It's set in several places of [enableTrueColors](https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/terminal.nim#L865). So a good start, since you're not already looking at that proc, is to call it and see if that fixes your problem.
- terminal.nim says i don't have a true color term (but it's ... jseb
- terminal.nim says i don't have a true color term (but ... jrfondren