Skip to content

Commit

Permalink
shell: source home-manager configuration
Browse files Browse the repository at this point in the history
This also sources ~/.nix-profile/etc/profile.d/nix.sh if it exists. See
NixOS/nix#2033 for details.
  • Loading branch information
midchildan committed Oct 21, 2020
1 parent 3ceed78 commit 817fbe6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions home/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ export PATH="$(shopt -s nullglob; printf "%s:" \
~/.emacs.d/bin \
)"

if [[ -f ~/.nix-profile/etc/profile.d/nix.sh ]]; then
source ~/.nix-profile/etc/profile.d/nix.sh
fi
if [[ -f ~/.nix-profile/etc/profile.d/hm-session-vars.sh ]]; then
source ~/.nix-profile/etc/profile.d/hm-session-vars.sh
fi

command -v direnv >/dev/null 2>&1 && eval "$(direnv hook bash)"

###########################
Expand Down
7 changes: 7 additions & 0 deletions home/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ typeset -U path
)
}

if [[ -f ~/.nix-profile/etc/profile.d/nix.sh ]]; then
source ~/.nix-profile/etc/profile.d/nix.sh
fi
if [[ -f ~/.nix-profile/etc/profile.d/hm-session-vars.sh ]]; then
source ~/.nix-profile/etc/profile.d/hm-session-vars.sh
fi

command -v direnv >/dev/null 2>&1 && eval "$(direnv hook zsh)"

###########################
Expand Down

0 comments on commit 817fbe6

Please sign in to comment.