nix-darwin icon indicating copy to clipboard operation
nix-darwin copied to clipboard

Fix sourcing nix-darwin environment in zsh

Open starcraft66 opened this issue 3 years ago • 5 comments

As discussed in the comments of #158, the environment set by nix-darwin for zsh is clobbered by the one set by Nix itself due to zsh's load order. This PR moves the environment sourcing to a more convenient location in the load order. Fixes #151 and #158.

starcraft66 avatar Feb 04 '21 17:02 starcraft66

This PR can solve my problem #271, thanks the author

c4dr01d avatar Feb 08 '21 01:02 c4dr01d

This PR is really just a work-around for an issue in the darwin daemon installation of Nix itself. The NIX_PATH load order has already been fixed twice in Nix but for some reason, the fix hasn't been backported to the master branch. I'm leaving this open in case it can help anyone but it seems to break a test I haven't been able to look into.

starcraft66 avatar Feb 08 '21 20:02 starcraft66

I created https://github.com/LnL7/nix-darwin/compare/installer-link-etc-files as a way to resolve this in a nicer way, just haven't verified that this restores everything properly after the uninstaller.

LnL7 avatar Feb 10 '21 17:02 LnL7

Does anyone have a recommendation on how to fix this problem at the moment? I'm completely new to nix, nix-darwin, etc.

It sounds like I can manually modify /etc/zshrc after installation with the change from this PR, but I think that goes against Nix's philosophy. Is there a way for me to apply this PR (or your linked PR @LnL7) locally?

indiv0 avatar Apr 03 '21 23:04 indiv0

@LnL7 do you need assistance verifying that the uninstaller on your branch works the way you want? I'm willing to help

the-destro avatar Sep 30 '21 16:09 the-destro