devenv
devenv copied to clipboard
Prevent Project Directory from Being Copied into `/nix/store`
Description:
Currently, the behavior of the devenv tool includes copying the project directory (specified by $DEVENV_ROOT_FILE) into the /nix/store. This can lead to issues related to storage management and unwanted duplication of project files.
Expected Behavior:
The project directory should remain in its original location without being duplicated in the /nix/store. This will help maintain a cleaner environment and avoid potential conflicts or confusion arising from multiple copies of the same files.
Steps to Reproduce:
- Set up a project using
devenvflake.nix with .envrc file . - Run the direnv allow to initialize or build the environment.
- Check the
/nix/storefor any copies (*-source) of the project directory.
Actual Behavior:
The project directory is copied into /nix/store, leading to unnecessary duplication and possible critical security leakage
Additional Information:
This issue has been observed in various setups and may affect users who rely on a clean Nix environment. A solution that prevents this behavior would enhance usability and efficiency for developers using devenv.
maybe related with: https://github.com/NixOS/nix/issues/5551 https://github.com/NixOS/nix/issues/3121 https://github.com/NixOS/nix/issues/5574 and possible workaround https://github.com/direnv/direnv/issues/1103
please, update the docs with example flakes configurations that don't store users project into /nix/store
It copies that only if you use flakes, not if you use devenv itself.
Closing, this is a flake issue.