Closed savil closed 2 weeks ago
I can't remember why this was explicitly added either. Does
nix-daemon.sh
still only run once indevbox shell
anddevbox shell --pure
? I think a good way to check is to see if there are duplicate paths inNIX_PROFILES
.
My observations:
# start with devbox global
% env | grep NIX_PROFILE
NIX_PROFILES=/nix/var/nix/profiles/default /Users/savil/.nix-profile
# go to devbox repo and start the shell
% cd ~/code/jetpack/devbox
% devbox shell
Starting a devbox shell...
% env | grep NIX_PROFILE
NIX_PROFILES=/nix/var/nix/profiles/default /Users/savil/.nix-profile
no duplicates seen!
Thanks for double checking!
Summary
This was introduced in #635 (cc @ipince). I don't think its needed anymore. It seems to be used in the
/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
script, at the very top to prevent re-execution:Perhaps it has other use-cases as well? RFC.
From my casual usage of a Devbox binary built with this change, it all seems to still work fine.
How was it tested?