refactor(Installers): Update all installers to use library helpers and Update add_installer skill

This commit is contained in:
2026-06-28 08:17:30 +05:30
parent 03e9c20e54
commit f9a25ff37e
7 changed files with 54 additions and 39 deletions

View File

@@ -24,8 +24,9 @@ install_docker() {
fi
fi
# Use pkg_install for distro packages (it automatically handles rollback hooks for the packages!)
# Use pkg_install for distro packages and explicitly register them for reference-counted rollback
pkg_install "arch:docker|debian:docker.io|fedora:docker"
registry_add_sys_deps "docker" "arch:docker|debian:docker.io|fedora:docker"
# Ensure docker group exists (some distros might not create it immediately)
if ! getent group docker >/dev/null 2>&1; then

View File

@@ -24,6 +24,7 @@ install_nvm() {
if ! has_command tar; then
log_info "tar not found. Installing tar..."
pkg_install tar
registry_add_sys_deps "node" "tar"
fi
# Try to fetch the latest version of NVM from GitHub API

View File

@@ -40,6 +40,17 @@ install_packages() {
"debian:python3-venv" \
"fedora:gcc-c++"
registry_add_sys_deps "nvim" \
git tar unzip ripgrep fzf nodejs npm xclip wl-clipboard \
"arch:fd|debian:fd-find|fedora:fd-find" \
"arch:cmake|debian:cmake|fedora:cmake" \
"arch:make|debian:build-essential|fedora:make" \
"arch:gcc|debian:build-essential|fedora:gcc" \
"arch:python|debian:python3|fedora:python3" \
"debian:python3-pip|fedora:python3-pip" \
"debian:python3-venv" \
"fedora:gcc-c++"
create_fd_symlink
log_info "Installing tree-sitter-cli globally..."

View File

@@ -38,6 +38,7 @@ install_yay() {
else
log_info "Dependencies (git and base-devel) are already present. Skipping package installation."
fi
registry_add_sys_deps "yay" "git" "base-devel"
log_info "Cloning yay-bin repository..."
local clone_dir

View File

@@ -45,6 +45,7 @@ install_yazi() {
if ! has_command unzip; then
log_info "unzip not found. Installing unzip..."
pkg_install unzip
registry_add_sys_deps "yazi" "unzip"
fi
local arch

View File

@@ -19,6 +19,7 @@ install_fzf() {
log_info "fzf not found. Installing fzf..."
pkg_install fzf
registry_add_sys_deps "zoxide" "fzf"
}
install_zoxide() {