nix-darwin
nix-darwin copied to clipboard
Nix-Darwin x HM doesn't install paths in for zsh `/run/current-system/sw/bin`
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
- Nix: 2.21.1
- MacOS: Sonoma 14.4
- M2 Macbook pro 13inch with 8 gb of memory
- Nix Config: https://github.com/Eveeifyeve/Dotfiles
I have tried both the distributed systems and nixos.org nix and still not working so it's not a nix problem.
If you add programs.zsh.enable = true;
does that fix it?
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
If i add the programs.enabled.zsh it still doesn't work.
I have discussed in both distributed systems and nix discord and told me it's a nix-darwin issue.
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
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.
Okay It turns out I have to enable it with nix-darwin not hw.
I will make a pr that warns people about this.
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
.
Looks like this issue is due to https://github.com/nix-community/home-manager/issues/2751
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 #
I also have the same problem.