From 49106f95ae257e46ec72aa0e8e9d346aa3626b07 Mon Sep 17 00:00:00 2001 From: "Aaron L. Zeng" Date: Thu, 27 May 2021 13:07:38 -0400 Subject: [PATCH] Copy nix and home-manager init to zprofile This is a workaround for macOS's path_helper stuff in /etc/zprofile: - https://github.com/NixOS/nix/issues/4169 - https://github.com/LnL7/nix-darwin/issues/122 --- runcoms/zprofile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/runcoms/zprofile b/runcoms/zprofile index a31e8ed629..2bba5bb1fe 100644 --- a/runcoms/zprofile +++ b/runcoms/zprofile @@ -104,3 +104,14 @@ path=( ) zprofile_sourced=1 + +# Redundant with .zshenv as a workaround for: +# - https://github.com/NixOS/nix/issues/4169 +# - https://github.com/LnL7/nix-darwin/issues/122 +if [ -e ~/.nix-profile/etc/profile.d/nix.sh ]; then + . ~/.nix-profile/etc/profile.d/nix.sh +fi + +if [ -e ~/.nix-profile/etc/profile.d/hm-session-vars.sh ]; then + . ~/.nix-profile/etc/profile.d/hm-session-vars.sh +fi