Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Project Directory from Being Copied into /nix/store #1638

Open
x-0D opened this issue Dec 9, 2024 · 1 comment
Open

Prevent Project Directory from Being Copied into /nix/store #1638

x-0D opened this issue Dec 9, 2024 · 1 comment
Labels
bug Something isn't working flakes Related to running devenv using the flake integration

Comments

@x-0D
Copy link

x-0D commented Dec 9, 2024

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:

  1. Set up a project using devenv flake.nix with .envrc file .
  2. Run the direnv allow to initialize or build the environment.
  3. Check the /nix/store for 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: NixOS/nix#5551 NixOS/nix#3121 NixOS/nix#5574 and possible workaround direnv/direnv#1103

please, update the docs with example flakes configurations that don't store users project into /nix/store

@x-0D x-0D added the bug Something isn't working label Dec 9, 2024
@domenkozar
Copy link
Member

It copies that only if you use flakes, not if you use devenv itself.

@sandydoo sandydoo added the flakes Related to running devenv using the flake integration label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flakes Related to running devenv using the flake integration
Projects
None yet
Development

No branches or pull requests

3 participants