My nix-darwin and NixOS config
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

zsh: guard optional tool sources; fix tailscale ProxyCommand path

Source cargo, deno, homebrew, and orbstack env files conditionally so
missing installs don't cause errors on any host.

Fix SSH ProxyCommand on macOS to use the absolute Tailscale.app binary
path — ProxyCommand runs with a minimal environment so Homebrew PATH
isn't available.

+11 -10
+6 -5
home/programs/ssh.nix
··· 5 5 cfg = cfgLib.cfg; 6 6 userName = cfg.user.username; 7 7 8 - # Tailscale binary path differs by platform 9 - # macOS: Homebrew Cask provides CLI in PATH after brew shellenv 10 - # Linux: Nix package provides the binary 11 - tailscaleBin = if isDarwin 12 - then "tailscale" # Rely on Homebrew PATH 8 + # Tailscale binary path differs by platform. 9 + # macOS: use the absolute path bundled inside Tailscale.app — ProxyCommand 10 + # runs with a minimal environment so Homebrew PATH isn't available. 11 + # Linux: Nix package provides the binary. 12 + tailscaleBin = if isDarwin 13 + then "/Applications/Tailscale.app/Contents/MacOS/Tailscale" 13 14 else "${pkgs.tailscale}/bin/tailscale"; 14 15 15 16 # Define our internal Tailscale hosts
+5 -5
home/programs/zsh.nix
··· 114 114 profileExtra = 115 115 # ── Cross-platform ────────────────────────────────────────────────────── 116 116 '' 117 - # Cargo 118 - . "$HOME/.cargo/env" 117 + # Cargo (rustup-managed install, if present) 118 + [ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env" 119 119 120 120 # pipx / local user binaries 121 121 export PATH="$PATH:$HOME/.local/bin" ··· 123 123 # ── macOS only ────────────────────────────────────────────────────────── 124 124 + lib.optionalString isDarwin '' 125 125 # Deno 126 - . "$HOME/.deno/env" 126 + [ -f "$HOME/.deno/env" ] && . "$HOME/.deno/env" 127 127 128 128 # Homebrew 129 - eval "$(/opt/homebrew/bin/brew shellenv)" 129 + [ -x "/opt/homebrew/bin/brew" ] && eval "$(/opt/homebrew/bin/brew shellenv)" 130 130 131 131 # OrbStack 132 - source ~/.orbstack/shell/init.zsh 2>/dev/null || : 132 + [ -f "$HOME/.orbstack/shell/init.zsh" ] && source "$HOME/.orbstack/shell/init.zsh" 133 133 ''; 134 134 }; 135 135 }