如何处理 macos 升级之后丢失 nix

发布于
·
刚刚更新🔥 热乎乎
使用 vim 来添加
sudo vi /etc/zshrc
将下面的内容添加到 /etc/zshrc 末尾重启终端即可
bash
# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix
注意,如果提示 readonly, 使用 :wq! 退出并保存即可
参考链接: https://discourse.nixos.org/t/nix-commands-missing-after-macos-12-1-version-upgrade/16679/4