Closed korayal closed 9 months ago
Right after posting this message, I noticed that the output of nix eval --impure --expr "<nixpkgs>"
was different between my shell vs emacs. The former was correctly pointing to my local ~/.nix-defexr/channels/nixpkgs
whereas the latter one was pointing to the root user's.
So, the versions were different, which caused me to get two different profiles.
I'd like to use
nix_direnv_manual_reload
on my project, so that I don't have to get blocked on emacs waiting for direnv to load (which sometimes takes minutes).But, I noticed that even though there's an existing cache for nix-direnv which works fine on my shell,
I
always get the same warning in the*envrc*
buffer, when I load the project in emacs. So, I modified thedirenvrc
file to output more logging, like printing the current$profile_rc
and$profile
values.And then I noticed that the
profile
andprofile_rc
variables are different between the two (my terminal vs the emacs'*envrc*
buffer)So, now there are two
nix-profile-*
paths, and the call tonix_clear_old_gc_roots
just deletes the one created (or attempted to be created) by emacs. When I tried to create those files myself, they just got deleted after the build.So, the problem is, for some reason, I'm getting two separate
$profile
variables between these two use cases.