dotfiles/install/lib/packages.sh
Claude 096c3c8afa
feat(install): switch to Homebrew for the CLI toolchain
Ubuntu 24.04's apt versions of fzf/fd/bat/eza/zoxide/ripgrep/tmux/nvim/
lazygit/starship are frozen at April 2024 — and the previous GitHub-
release downloads went stale the moment you stopped re-running the
installer. Homebrew on Linux fixes both: always-latest releases and a
single 'brew upgrade' to update the whole CLI stack.

Two-tier install:
  apt   - zsh + base plumbing + WezTerm (vendor repo) + Brave Beta
          (vendor repo). Vendor repos auto-update via 'apt upgrade'.
  brew  - fzf fd bat eza zoxide ripgrep tmux neovim lazygit starship
          gh zsh-syntax-highlighting zsh-autosuggestions
  nvm   - official installer (pinned NVM_VERSION)
  tpm   - tmux plugin manager clone

New files:
  install/Brewfile - bundle for 'brew bundle'
  install/lib/brew.sh - Homebrew bootstrap + brew bundle
  install/lib/extras.sh - nvm + tpm
  install/install.sh - rewired entry point with --packages-only,
    --dotfiles-only, --help
  install/README.md - new docs for the two-tier strategy

.zshrc:
  - Source brew shellenv first when present, so brew bins win on PATH
  - 'update' alias now: brew upgrade && sudo apt update && sudo apt upgrade
    (previously apt-only; before that pacman-only)

Drops install/lib/packages.sh entries that the now-Brewfile-managed tools
duplicated, and removes the GitHub-release tarball install path.
2026-06-10 16:54:47 +00:00

59 lines
1.4 KiB
Bash

#!/bin/bash
# apt: system base + GUI apps from vendor repos (WezTerm, Brave Beta).
# All CLI tools come from Homebrew (lib/brew.sh) so they stay current.
APT_PACKAGES=(
# Login shell (system-level so chsh can point at /usr/bin/zsh)
zsh
# Core plumbing + Homebrew prerequisites
git
curl
wget
ca-certificates
gnupg
build-essential
procps
file
unzip
xz-utils
# Wayland clipboard (Pop!_OS Cosmic is Wayland-native)
wl-clipboard
)
install_apt_packages() {
apt_update_once
info "Installing apt packages (${#APT_PACKAGES[@]} packages)..."
apt_install "${APT_PACKAGES[@]}"
}
install_wezterm() {
if command -v wezterm >/dev/null 2>&1; then
info "WezTerm already installed"
return
fi
add_apt_repo wezterm-fury \
https://apt.fury.io/wez/gpg.key \
"deb [signed-by=$KEYRINGS_DIR/wezterm-fury.gpg] https://apt.fury.io/wez/ * *"
apt_update_once
apt_install wezterm
}
install_brave_beta() {
if command -v brave-browser-beta >/dev/null 2>&1; then
info "Brave Beta already installed"
return
fi
add_apt_repo brave-browser-beta-archive-keyring \
https://brave-browser-apt-beta.s3.brave.com/brave-browser-archive-keyring.gpg \
"deb [signed-by=$KEYRINGS_DIR/brave-browser-beta-archive-keyring.gpg arch=amd64] https://brave-browser-apt-beta.s3.brave.com/ stable main"
apt_update_once
apt_install brave-browser-beta
}
install_all_packages() {
install_apt_packages
install_wezterm
install_brave_beta
}