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 @@
22# 1. OS-SPECIFIC CONFIGURATION
33# ==============================================================================
44
5# Use uname to detect the OS and set the correct Homebrew path
65if [[ "$(uname)" == "Darwin" ]]; then
7 # macOS (Apple Silicon)
8 BREW_PREFIX="/opt/homebrew"
6 # macOS - Check for custom path first, then standard paths
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
917elif [[ "$(uname)" == "Linux" ]]; then
1018 # Linux (Linuxbrew)
1119 BREW_PREFIX="/home/linuxbrew/.linuxbrew"
1220fi
1321
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
1427# ==============================================================================
1528# 2. PRE-INITIALIZATION (Instant Prompt)
1629# ==============================================================================