dotfiles/install/README.md

89 lines
3.7 KiB
Markdown

# Pop!_OS / Ubuntu install
A small, idempotent installer that gets a fresh Pop!_OS 24.04 (or any
Ubuntu 24.04 / Debian-derivative) to the state these dotfiles assume.
## Two-tier strategy
| Source | What lives there | Why |
|--------|------------------|-----|
| **apt** | `zsh`, `git`, `curl`, `build-essential`, `python3`, `python3-pip`, `python3-venv`, `luarocks`, `wl-clipboard`, `wezterm`, `brave-browser-beta` | System base, Mason prerequisites, and GUI vendor apps. Vendor apt repos auto-update Brave/WezTerm with `apt upgrade`. |
| **Homebrew** | `fzf` `fd` `bat` `eza` `zoxide` `ripgrep` `tmux` `neovim` `lazygit` `starship` `gh` `zsh-syntax-highlighting` `zsh-autosuggestions` | CLI toolchain. Ubuntu 24.04's apt versions are frozen at April 2024; brew always has latest. One `brew upgrade` updates all of them. |
| **nvm** | Node.js runtime | Installs the latest LTS release and sets it as the default; `.zshrc` sources `~/.nvm/nvm.sh`. |
| **tpm** | tmux plugin manager | Clone of `tmux-plugins/tpm` so the bundled `tmux.conf` works on first launch. |
Downloaded installer scripts, apt signing keys, and the Nerd Font archive
are pinned and verified before use. Updating their upstream versions requires
updating the corresponding SHA-256 hashes or fingerprints in `install/lib/`.
GitHub-release-binary downloads (the previous approach for nvim/lazygit/
starship) have been retired — they ran latest at install time then went
stale. Brew solves that.
## Environment required
- Pop!_OS 24.04 (or Debian/Ubuntu derivative) — preflight aborts if
`apt-get` is missing.
- A regular user with `sudo`**not** root.
- Outbound HTTPS to `apt.fury.io`, `brave.com`, `cli.github.com`,
`github.com`, `raw.githubusercontent.com`, and Ubuntu mirrors.
## Install
```bash
git clone https://github.com/brianpooe/dotfiles.git ~/dotfiles
~/dotfiles/install/install.sh
```
Then open a new terminal (or log out + back in) so the new login shell
takes effect.
### Flags
```bash
install/install.sh # full install
install/install.sh --packages-only # apt + brew + nvm + tpm, skip symlinks
install/install.sh --dotfiles-only # symlink + chsh + tpm + nvm, skip packages
install/install.sh --help
```
## Keeping current
```bash
update # alias: brew upgrade && sudo apt update && sudo apt upgrade -y
```
The CLI tools come from brew, so they stay on bleeding-edge stable. Brave
and WezTerm come from vendor apt repos so `apt upgrade` always has the
latest of those too.
## Layout
```
install/
install.sh entry point
Brewfile CLI toolchain bundle (brew owns these)
lib/common.sh helpers: apt_install, add_apt_repo, backup_and_link
lib/packages.sh apt base + WezTerm + Brave Beta vendor repos
lib/brew.sh install Homebrew + `brew bundle`
lib/extras.sh nvm + tpm
lib/fonts.sh verified JetBrainsMono Nerd Font install
lib/dotfiles.sh symlink dotfiles + chsh zsh
```
## What the installer does, in order
1. **preflight** — verify apt + not-root + sudo + curl.
2. **apt base** — system packages plus Mason's Python venv/pip and LuaRocks prerequisites.
3. **WezTerm apt repo**`apt install wezterm`.
4. **Brave Beta apt repo**`apt install brave-browser-beta`.
5. **Homebrew install** (NONINTERACTIVE) + `brew bundle` against `Brewfile`.
6. **nvm** (pinned `$NVM_VERSION`, default `v0.40.1`) + latest LTS Node.js.
7. **tpm** clone to `~/.tmux/plugins/tpm`.
8. **Symlink** `nvim tmux starship lazygit wezterm → ~/.config/...`;
`.config/.ideavimrc → ~/.ideavimrc`; `.zshrc`, `.gitconfig → ~`;
`dotfiles-apply-theme → ~/.local/bin/`.
9. **chsh** login shell to zsh.
Pre-existing config targets get backed up to `*.pre-install.<timestamp>`,
not deleted.