Environment variables are added if you have created a file called .nu inside a whitelisted directory, formatted as shown below. (I am, of course, open to change everything about this)
```
[env]
var = "value"
anothervar = "anothervalue"
```
In order for a .nu-file to be read, the directory it is in must be listed in the `nu_env_dirs` variable in nushell's `config.toml`.
- If you are in a subdirectory to a directory with a .nu-file, the vars in that .nu-file are applied.
- If you leave a directory which set some variables, the variables are unset.
- If a directory contains a .nu with an environment variable already set, the old value will be overwritten with the value from the .nu. This holds even if the old value was set by a .nu in a parent directory.
- The overwritten value is restored when you leave the directory.