cmc/dotfiles
Using GNU Stow to manage my dotfiles.
clone: git clone https://gitbay.org/cmc/dotfiles.git
c3e1b1896ab156f6fa1529ebd630b065eff42efa
unsigned
author: Christian Cleberg <hello@cleberg.net> · 2026-02-13T19:52:43Z
zsh/.zprofile | 16 +++++++++++++++- zsh/.zshrc | 3 +-- 2 files changed, 16 insertions(+), 3 deletions(-) @@ -1,2 +1,16 @@ +# ============================================================================== +# HOMEBREW INITIALIZATION (macOS & Linux) +# ============================================================================== -eval "$(/opt/homebrew/bin/brew shellenv)" +if [[ "$(uname)" == "Darwin" ]]; then + # macOS (Apple Silicon) + BREW_PATH="/opt/homebrew/bin/brew" +elif [[ "$(uname)" == "Linux" ]]; then + # Linux (Linuxbrew) + BREW_PATH="/home/linuxbrew/.linuxbrew/bin/brew" +fi + +# Only run shellenv if the brew binary actually exists at that path +if [[ -f "$BREW_PATH" ]]; then + eval "$($BREW_PATH shellenv)" +fi @@ -23,9 +23,8 @@ fi # 3. ENVIRONMENT VARIABLES & PATH # ============================================================================== -export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" export PATH="$HOME/.local/xonsh-env/xbin:$PATH" -export PATH="$BREW_PREFIX:$PATH" +export PATH="$BREW_PREFIX/bin:$PATH" export GPG_TTY=$(tty) # borgbackup