split bootstrap command and install uv separate from homebrew

This commit is contained in:
Josh Thomas 2024-10-09 11:02:56 -05:00
parent b70905e2ee
commit 45ff69a37b
13 changed files with 57 additions and 41 deletions

View file

@ -16,5 +16,4 @@ brew "neovim"
brew "pipx"
brew "ripgrep"
brew "starship"
brew "uv"
brew "zoxide"

View file

@ -6,6 +6,8 @@
set -ouex pipefail
cd "$HOME" || exit 1
# Directory to look for bootstrap executables in
BOOTSTRAP_D="${BASH_SOURCE[0]}.d"

View file

@ -0,0 +1,5 @@
#!/usr/bin/bash
set -ouex pipefail
chmod 700 "$HOME/.cache" "$HOME/.config"

View file

@ -0,0 +1,6 @@
#!/usr/bin/bash
set -ouex pipefail
yadm gitconfig core.sparseCheckout true
yadm sparse-checkout set '/*' '!README.md' '!LICENSE' '!.github/workflows/*'

View file

@ -0,0 +1,7 @@
#!/usr/bin/bash
set -ouex pipefail
if command -v flatpak &>/dev/null && [ -f "$HOME/.flatpaks" ]; then
xargs -a "$HOME/.flatpaks" -r flatpak --system -y install --or-update
fi

View file

@ -0,0 +1,7 @@
#!/usr/bin/bash
set -ouex pipefail
if command -v brew &>/dev/null && [ -f "$HOME/.Brewfile" ]; then
brew bundle --global
fi

View file

@ -0,0 +1,11 @@
#!/usr/bin/bash
set -ouex pipefail
if command -v mise &>/dev/null; then
mise install --yes
fi
if ! command -v uv &>/dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="$HOME/.local" sh
fi

View file

@ -0,0 +1,18 @@
#!/usr/bin/bash
set -ouex pipefail
if command -v nvim &>/dev/null; then
# force install of Neovim plugins
nvim --headless -u "$HOME/.config/nvim/init.lua" -c "Lazy! sync" +qa
# lazygit's native theme depends on the autogenerated one
# provided by Lazyvim, so open lazygit in neovim headless mode
# to make sure it's generated
nvim --headless -u "$HOME/.config/nvim/init.lua" -c ":lua require('lazyvim.util.lazygit').open()" +qa
# TODO: install language providers
# python: activate venv and install requirements.txt in ~/.config/nvim
# perl: cpanm -n Neovim::Ext
# - I am not, nor have never been a perl programmer, but `:checkhealth` within Neovim
# complains about this, so there must be some reason to do this (nvim internals, plugins,
# whatever..) -- doesn't really affect me but doesn't hurt to do
fi

View file

@ -1,45 +1,6 @@
#!/usr/bin/bash
set -euo pipefail
cd "$HOME" || exit
# permissions
chmod 700 "$HOME/.cache" "$HOME/.config"
# sparse checkout
yadm gitconfig core.sparseCheckout true
yadm sparse-checkout set '/*' '!README.md' '!LICENSE' '!.github/workflows/*'
# install flatpaks
if command -v flatpak &>/dev/null && [ -f "$HOME/.flatpaks" ]; then
xargs -a "$HOME/.flatpaks" -r flatpak --system -y install --or-update
fi
# install homebrew tools
if command -v brew &>/dev/null && [ -f "$HOME/.Brewfile" ]; then
brew bundle --global
fi
# install programming languages
if command -v mise &>/dev/null; then
mise install --yes
fi
if command -v nvim &>/dev/null; then
# force install of Neovim plugins
nvim --headless -u "$HOME/.config/nvim/init.lua" -c "Lazy! sync" +qa
# lazygit's native theme depends on the autogenerated one
# provided by Lazyvim, so open lazygit in neovim headless mode
# to make sure it's generated
nvim --headless -u "$HOME/.config/nvim/init.lua" -c ":lua require('lazyvim.util.lazygit').open()" +qa
# TODO: install language providers
# python: activate venv and install requirements.txt in ~/.config/nvim
# perl: cpanm -n Neovim::Ext
# - I am not, nor have never been a perl programmer, but `:checkhealth` within Neovim
# complains about this, so there must be some reason to do this (nvim internals, plugins,
# whatever..) -- doesn't really affect me but doesn't hurt to do
fi
set -ouex pipefail
# TODO: add notes about post bootstrap process
# - login to self-hosted atuin sync server