Glad to see someone else had the same requirements in regards to managing environments and environment variables in NestJS. What we ended up using was nest-typed-config with its multiple loaders approach.
Basically we have 4 different config files:
We still leverage the env var loader with highest precedence to adhere to 12factor principles, while providing sane defaults to ease the setup and being developer friendly.