diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9b1709e..3d0bde4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -100,6 +100,10 @@ jobs: persist-credentials: false - name: Install dotfiles run: sh -c "$(curl -fsLS chezmoi.io/get)" -- init --source-path . --apply + - name: Validate rendered mise config + run: | + test -f "$HOME/.config/mise/config.toml" + python3 -c "import tomllib; tomllib.load(open('$HOME/.config/mise/config.toml', 'rb'))" gatekeeper: name: Merge Gatekeeper diff --git a/README.md b/README.md index 3d727da..13aa735 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,21 @@ This dotfiles repository is intended to be used for Debian or Ubuntu under WSL2. - [mise](https://mise.jdx.dev) - [Docker](https://www.docker.com) +## 📦 Package management policy + +This repository uses two package managers with distinct roles: + +- **[Homebrew](https://brew.sh)** ([`Brewfile`](Brewfile)): system-level tools, + build dependencies, and CLI tools that don't need per-project version + pinning (e.g. `gcc`, `cmake`, `sheldon`, `starship`, `zsh`). +- **[mise](https://mise.jdx.dev)** + ([`dot_config/mise/config.toml.tmpl`](dot_config/mise/config.toml.tmpl)): + language runtimes and CLI tools that benefit from version management (e.g. + `node`, `rust`, `eza`, `ripgrep`, `fzf`). + +When adding a new tool, prefer mise if it's a versioned runtime or a tool you +might want to pin per-project; use Homebrew otherwise. + ## 🔰 How to use 1. Clone this repository @@ -43,6 +58,12 @@ This dotfiles repository is intended to be used for Debian or Ubuntu under WSL2. ``` 6. Reboot your distribution + + mise-managed tools (see "Package management policy" above) become + available automatically once the install script finishes running + `mise install`; no manual `mise trust` step is needed since the config + lives in the global `~/.config/mise/config.toml`. + 7. Make a GPG key for GitHub. If you want to manipulate Git in the GUI within VS Code, do the following. diff --git a/dot_zshrc b/dot_zshrc index aa29263..2bfb7df 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -19,12 +19,10 @@ fi ## sheldon eval "$(sheldon source)" -## eza +## Homebrew completions if type brew &>/dev/null; then - export FPATH="/home/linuxbrew/.linuxbrew/bin/eza/completions/zsh:$FPATH" FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" - autoload -Uz compinit - compinit + export FPATH fi ## fzf diff --git a/install-packages.sh b/install-packages.sh index b7f38e5..a15a50e 100755 --- a/install-packages.sh +++ b/install-packages.sh @@ -71,7 +71,6 @@ brew bundle --file ./Brewfile ## Install mise /bin/bash -c "$(curl https://mise.run | sh)" -mise install # Change the default shell to zsh sudo sh -c "echo '/home/linuxbrew/.linuxbrew/bin/zsh' >> /etc/shells" @@ -80,6 +79,9 @@ chsh -s /home/linuxbrew/.linuxbrew/bin/zsh # Set up by Chezmoi chezmoi init --source-path . --apply +# Install mise-managed tools (requires ~/.config/mise/config.toml rendered by chezmoi apply above) +mise install + # Create the flag file to indicate the script has been executed touch "$FLAG_FILE"