Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix-Darwin x HM doesn't install paths in for zsh /run/current-system/sw/bin #922

Open
Eveeifyeve opened this issue Apr 4, 2024 · 12 comments

Comments

@Eveeifyeve
Copy link

The issue is when I install nix on my machine m2 Macbook pro 13inch it some how doesn't have this path exported which I need for darwin-rebuild for some reason only nix run nix-darwin -- switch --flake ~/.dotfiles/ seems to work.

PATH Echo Output

/Users/eveeifyeve/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/bin:/bin

List /run/current-system/sw/bin

bash			darwin-option		info			nix-build		nix-daemon		nix-instantiate		pdftexi2dvi		texi2dvi
bashbug			darwin-rebuild		install-info		nix-channel		nix-env			nix-prefetch-url	pod2texi		texi2pdf
brew			darwin-uninstaller	makeinfo		nix-collect-garbage	nix-hash		nix-shell		sh			texindex
darwin-help		darwin-version		nix			nix-copy-closure	nix-info		nix-store		texi2any

Info

@Eveeifyeve
Copy link
Author

I have tried both the distributed systems and nixos.org nix and still not working so it's not a nix problem.

@Enzime
Copy link
Collaborator

Enzime commented Apr 5, 2024

If you add programs.zsh.enable = true; does that fix it?

@yswtrue
Copy link

yswtrue commented Apr 5, 2024

same here I have set programs.fish.enable = true;, but there is no in$PATH

 ~  echo $PATH                                                  21.3s  Sat Apr  6 03:34:06 2024
/nix/var/nix/profiles/default/bin /opt/homebrew/bin /usr/local/bin /System/Cryptexes/App/usr/bin /usr/bin /bin /usr/sbin /sbin /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin

@Eveeifyeve
Copy link
Author

Eveeifyeve commented Apr 5, 2024

If i add the programs.enabled.zsh it still doesn't work.

@Eveeifyeve
Copy link
Author

I have discussed in both distributed systems and nix discord and told me it's a nix-darwin issue.

@yswtrue
Copy link

yswtrue commented Apr 6, 2024

finally I install fish from nix-darwin

        environment.shells = [ pkgs.bashInteractive pkgs.zsh pkgs.fish ];

and then chsh to /run/current-system/sw/bin/fish
than reboot fix this error, seams fish from brew can't read nix relate config

@Eveeifyeve
Copy link
Author

I have tried a new fresh install of nix and removed all of the volumes and stuff and path is still not added I am going to try the enable zsh method.

@Eveeifyeve
Copy link
Author

Okay It turns out I have to enable it with nix-darwin not hw.

I will make a pr that warns people about this.

@ibizaman
Copy link

ibizaman commented Apr 15, 2024

Thank you @Eveeifyeve I was trying to debug this since a long time and found your comment. Now my path contains /run/current-system/sw/bin.

@ibizaman
Copy link

Looks like this issue is due to nix-community/home-manager#2751

@Eveeifyeve
Copy link
Author

Eveeifyeve commented Apr 18, 2024

Hey I want to do a check for one of the shell is enabled but I want ask where exactly the check be located?
The check is for people who don't enabled any shell and that way it errors out if you haven't enabled it.

It will maybe close: #922 #122 #158.
There maybe more that I don't know if there is reply to this with the #.

@stringang
Copy link

I also have the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants