cmc/dotfiles

Using GNU Stow to manage my dotfiles. config dotfiles macos stow

Commit 81137fa2d7

81137fa2d7a0710713d2afed1f2d1955cfd6cefa

parent: 885980a3b3

Verified · cmc

cmc <hello@cleberg.net> · 2026-02-23 17:56 UTC

add option for local brew

Layout: unified · split

common/zsh/.zshrc +16 −3
@@ -2,15 +2,28 @@
2# 1. OS-SPECIFIC CONFIGURATION 2# 1. OS-SPECIFIC CONFIGURATION
3# ============================================================================== 3# ==============================================================================
4 4
5# Use uname to detect the OS and set the correct Homebrew path
6if [[ "$(uname)" == "Darwin" ]]; then 5if [[ "$(uname)" == "Darwin" ]]; then
7 # macOS (Apple Silicon) 6 # macOS - Check for custom path first, then standard paths
8 BREW_PREFIX="/opt/homebrew" 7 if [ -d "$HOME/Documents/.brew" ]; then
8 # Custom installation path
9 BREW_PREFIX="$HOME/Documents/.brew"
10 elif [ -d "/opt/homebrew" ]; then
11 # Standard path for Apple Silicon Macs
12 BREW_PREFIX="/opt/homebrew"
13 else
14 # Standard path for Intel Macs
15 BREW_PREFIX="/usr/local"
16 fi
9elif [[ "$(uname)" == "Linux" ]]; then 17elif [[ "$(uname)" == "Linux" ]]; then
10 # Linux (Linuxbrew) 18 # Linux (Linuxbrew)
11 BREW_PREFIX="/home/linuxbrew/.linuxbrew" 19 BREW_PREFIX="/home/linuxbrew/.linuxbrew"
12fi 20fi
13 21
22# If a Homebrew installation was found, add it to the shell environment
23if [ -n "$BREW_PREFIX" ]; then
24 eval "$($BREW_PREFIX/bin/brew shellenv)"
25fi
26
14# ============================================================================== 27# ==============================================================================
15# 2. PRE-INITIALIZATION (Instant Prompt) 28# 2. PRE-INITIALIZATION (Instant Prompt)
16# ============================================================================== 29# ==============================================================================