jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
8.32k stars 194 forks source link

When XDG env variables are set, devbox still creates some files in non-XDG directories #432

Open loreto opened 1 year ago

loreto commented 1 year ago

Two examples reported by a user on Discord:

  1. .cache/devbox/bin/ where the devbox binaries are stored. I think this is because our launcher script is not respecting XDG even though most of the devbox binary itself is.

  2. The .nix-profile symlink. We need to investigate whether nix itself could follow XDG since underneath the covers we're relying on it.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will be closed in 5 days.

Lagoja commented 1 year ago
  1. I think this is low priority, but would be good for consistency.
  2. Since the new installer can respect XDG, we should see if we can use that. I guess one question is whether we would migrate users who are not currently respecting XDG, or if we'd just maintain backwards compatibility
gcurtis commented 1 year ago
  • Since the new installer can respect XDG, we should see if we can use that. I guess one question is whether we would migrate users who are not currently respecting XDG, or if we'd just maintain backwards compatibility

I did try enabling XDG in Nix before running the installer, but it ended up breaking things. I didn't spend much time trying to figure out why, so this would require a bit of debugging work. Nix might just need the ~/.nix-profile symlink for backwards compatibility for a while.

gcurtis commented 8 months ago

Is this still valid? I think Devbox respects XDG as much as possible and so do more recent versions of Nix.

savil commented 8 months ago

Sadly, I think envsec (or was it runx) doesn't respect XDG for macs