diff --git a/default.conf.yaml b/default.conf.yaml index a31a3d1..7f2eda5 100644 --- a/default.conf.yaml +++ b/default.conf.yaml @@ -38,5 +38,6 @@ ~/.tmux.conf: tmux/.tmux.conf ~/.vimrc: vim/.vimrc ~/.vim: vim/ + ~/.zprofile: zsh/.zprofile ~/.zshenv: zsh/.zshenv ~/.zshrc: zsh/.zshrc diff --git a/etc/profile b/etc/profile index 2baf0bc..8475c9a 100644 --- a/etc/profile +++ b/etc/profile @@ -2,34 +2,6 @@ has() { command -V "$1" > /dev/null 2>&1 } -source_if() { - if [ -e "$1" ]; then - source "$1" - fi -} - -path_if() { - if [ -d "$1" ]; then - case ":$PATH:" in - *:"$1":*) - ;; - *) - PATH="${1}${PATH:+:$PATH}" - esac - fi -} - -source_if "${HOME}/.nix-profile/etc/profile.d/nix.sh" - -path_if "$HOME/bin" -path_if "$HOME/.local/bin" -path_if /usr/local/bin -path_if /opt/homebrew/bin -path_if /opt/homebrew/sbin - -unset -f source_if -unset -f path_if - if has gnome-keyring-daemon; then eval "$(gnome-keyring-daemon --start)" export SSH_AUTH_SOCK diff --git a/zsh/.zprofile b/zsh/.zprofile new file mode 100644 index 0000000..aed9db7 --- /dev/null +++ b/zsh/.zprofile @@ -0,0 +1,27 @@ +source_if() { + if [ -e "$1" ]; then + source "$1" + fi +} + +path_if() { + if [ -d "$1" ]; then + case ":$PATH:" in + *:"$1":*) + ;; + *) + PATH="${1}${PATH:+:$PATH}" + esac + fi +} + +source_if "${HOME}/.nix-profile/etc/profile.d/nix.sh" + +path_if "$HOME/bin" +path_if "$HOME/.local/bin" +path_if /usr/local/bin +path_if /opt/homebrew/bin +path_if /opt/homebrew/sbin + +unset -f source_if +unset -f path_if diff --git a/zsh/.zshrc b/zsh/.zshrc index 10876a0..ff9a586 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -73,7 +73,7 @@ ${prompt}" export RPROMPT='' # aliases -source $HOME/.profile +source $HOME/.zprofile source $HOME/.config/zsh/aliases source $HOME/.config/zsh/j.sh