Not exactly.
1/ The process that is deploying, booting and testing a DUT (Device Under test) is called lava-run.
lava-run environment variables are controlled by /etc/lava-server/env.yaml
By default, all environment variables are removed and only a small set of variables are added.
This helps to make executions reproducible between dispatchers and instances.
So if you need an environment variable to be set, then you have to add it to /etc/lava-server/env.yaml
2/ On the DUT itself, by default, we don't add or change any environment variable. Because that's the user responsibility.
However, if /etc/lava-server/env.dut.yaml does exists, it will be used to add environment variables to the DUT shell.
To create the list of environment variables to add to the DUT, we take the full environment from lava-run (as defined by /etc/lava-server/env.yaml) and we apply the rules from env.dut.yaml.
I hope that does help you to understand how environment is setup in lava.
Rgds