devenv icon indicating copy to clipboard operation
devenv copied to clipboard

Dotenv only evaluates during the build

Open bjgbeelen opened this issue 2 years ago • 4 comments

When I enable dotenv my .env gets evaluated during the build of the environment. My expectation was that the .env would be evaluated every time I enter the enviornment, so that it is aware of changes. This appears however not te be the case and the .env file is static up to the moment that I make a chnage in my devenv.nix and it gets evaluated again.

I'd argue that if dotenv.enable = true then ideally a change to .env should trigger a new build of the environment?

bjgbeelen avatar Aug 07 '23 05:08 bjgbeelen

Anything new about this ? I think it's also an issue when using devenv with external flake. (dotenv not working like this.) BTW, it used to work in the past

noamsto avatar Oct 10 '24 09:10 noamsto

I think we fixed that in 1.6, can someone try with 1.8?

domenkozar avatar Jul 24 '25 20:07 domenkozar

Relevant for #2061

domenkozar avatar Sep 17 '25 20:09 domenkozar

Since we've added secretspec support, we won't be spending much time fixing .env support, although contributions are welcome.

domenkozar avatar Oct 20 '25 18:10 domenkozar