And I want to avoid doing that and make KM know about this already. Is it possible to do? I searched the forum and the wiki for env and only found ability to set ENV_PATH.
Keyboard Maestro converts any variables that start with ENV_ into environment variables when it launches sub-processes.
So you just need to create a Keyboard Maestro variable ENV_NIX_USER_PROFILE_DIR (and the others).
Since variables are permanent, you can just create them, but since they are easy to delete, I would probably create a macro that just contained a bunch of Set Variable to Text actions to set the various variables so you have it well documented what you are intending.