mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-18 14:06:00 +00:00
refactor(dfm): replace per-language install commands with mise
This commit is contained in:
@@ -73,21 +73,18 @@ section_install()
|
||||
MENU=(
|
||||
"all:Installs everything in the correct order"
|
||||
"apt-packages:Install apt packages (Debian/Ubuntu)"
|
||||
"cargo:Install rust/cargo packages"
|
||||
"cheat-databases:Install cheat external cheatsheet databases"
|
||||
"composer:Install composer"
|
||||
"dnf-packages:Install dnf packages (Fedora/RHEL)"
|
||||
"fonts:Install programming fonts"
|
||||
"gh:Install GitHub CLI Extensions"
|
||||
"git-crypt:Install git-crypt from source"
|
||||
"go:Install Go Packages"
|
||||
"imagick:Install ImageMagick CLI"
|
||||
"macos:Setup nice macOS defaults"
|
||||
"npm-packages:Install NPM Packages"
|
||||
"mise:Install tools via mise (runtimes + CLI tools)"
|
||||
"mise-cleanup:Remove old version manager installations (--dry-run supported)"
|
||||
"ntfy:Install ntfy notification tool"
|
||||
"nvm-latest:Install latest lts node using nvm"
|
||||
"nvm:Install Node Version Manager (nvm)"
|
||||
"python-packages:Install Python packages via uv"
|
||||
"python-libs:Install Python libraries (libtmux, pynvim)"
|
||||
"shellspec:Install shellspec testing framework"
|
||||
"xcode-cli-tools:Install Xcode CLI tools (macOS)"
|
||||
"z:Install z"
|
||||
@@ -107,13 +104,10 @@ section_install()
|
||||
$0 brew install
|
||||
$0 install fonts
|
||||
|
||||
# Tier 2: Language packages (depend on runtimes from Tier 1)
|
||||
$0 install cargo
|
||||
$0 install go
|
||||
# Tier 2: Runtimes and CLI tools via mise, then remaining installers
|
||||
$0 install mise
|
||||
$0 install composer
|
||||
$0 install nvm
|
||||
$0 install npm-packages
|
||||
$0 install python-packages
|
||||
$0 install python-libs
|
||||
|
||||
# Tier 3: Tool-dependent installers
|
||||
$0 install cheat-databases
|
||||
@@ -131,12 +125,6 @@ section_install()
|
||||
msgr yay "All done!"
|
||||
;;
|
||||
|
||||
cargo)
|
||||
msgr run "Installing cargo packages..."
|
||||
bash "$DOTFILES/scripts/install-cargo-packages.sh" \
|
||||
&& msgr yay "cargo packages installed!"
|
||||
;;
|
||||
|
||||
cheat-databases)
|
||||
msgr run "Installing cheat databases..."
|
||||
for database in "$DOTFILES"/scripts/install-cheat-*.sh; do
|
||||
@@ -163,12 +151,6 @@ section_install()
|
||||
&& msgr yay "github cli extensions installed!"
|
||||
;;
|
||||
|
||||
go)
|
||||
msgr run "Installing Go Packages..."
|
||||
bash "$DOTFILES/scripts/install-go-packages.sh" \
|
||||
&& msgr yay "go packages installed!"
|
||||
;;
|
||||
|
||||
imagick)
|
||||
msgr run "Downloading and installing ImageMagick CLI..."
|
||||
curl -L https://imagemagick.org/archive/binaries/magick > "$XDG_BIN_HOME/magick" \
|
||||
@@ -182,33 +164,21 @@ section_install()
|
||||
&& msgr yay "macOS defaults set!"
|
||||
;;
|
||||
|
||||
nvm)
|
||||
msgr run "Installing nvm..."
|
||||
local NVM_VERSION
|
||||
NVM_VERSION=$(x-gh-get-latest-version nvm-sh/nvm)
|
||||
msgr ok "Latest nvm version: $NVM_VERSION"
|
||||
local NVM_INSTALL="https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh"
|
||||
local NVM_CURL="curl -o- \"$NVM_INSTALL\" | bash"
|
||||
PROFILE=/dev/null bash -c "$NVM_CURL"
|
||||
$0 install nvm-latest
|
||||
msgr yay "nvm installed!"
|
||||
;;
|
||||
|
||||
nvm-latest)
|
||||
msgr run "Installing latest lts node..."
|
||||
if [ -n "$NVM_DIR" ]; then
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
mise)
|
||||
msgr run "Installing tools via mise..."
|
||||
if ! command -v mise &> /dev/null; then
|
||||
msgr nested "Installing mise..."
|
||||
curl https://mise.run | sh
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
nvm install --lts --latest-npm --default
|
||||
git checkout "$DOTFILES/base/zshrc"
|
||||
git checkout "$DOTFILES/base/bashrc"
|
||||
msgr yay "latest lts node installed!"
|
||||
mise install --yes
|
||||
mise reshim
|
||||
msgr yay "mise tools installed!"
|
||||
;;
|
||||
|
||||
npm-packages)
|
||||
msgr run "NPM Packages install started..."
|
||||
bash "$DOTFILES/scripts/install-npm-packages.sh" \
|
||||
&& msgr yay "NPM Packages have been installed!"
|
||||
mise-cleanup)
|
||||
msgr run "Cleaning up old version manager installations..."
|
||||
bash "$DOTFILES/scripts/cleanup-old-version-managers.sh" "${2:-}"
|
||||
;;
|
||||
|
||||
apt-packages)
|
||||
@@ -235,10 +205,10 @@ section_install()
|
||||
&& msgr yay "ntfy installed!"
|
||||
;;
|
||||
|
||||
python-packages)
|
||||
msgr run "Installing Python packages..."
|
||||
python-libs)
|
||||
msgr run "Installing Python libraries..."
|
||||
bash "$DOTFILES/scripts/install-python-packages.sh" \
|
||||
&& msgr yay "Python packages installed!"
|
||||
&& msgr yay "Python libraries installed!"
|
||||
;;
|
||||
|
||||
xcode-cli-tools)
|
||||
|
||||
Reference in New Issue
Block a user