devbox icon indicating copy to clipboard operation
devbox copied to clipboard

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

Open loreto opened this issue 2 years ago • 5 comments

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.

loreto avatar Jan 06 '23 15:01 loreto

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.

github-actions[bot] avatar Mar 11 '23 01:03 github-actions[bot]

  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

Lagoja avatar Mar 15 '23 17:03 Lagoja

  • 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 avatar Mar 15 '23 18:03 gcurtis

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

gcurtis avatar Jan 09 '24 21:01 gcurtis

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

savil avatar Jan 09 '24 21:01 savil