Rework for void + dms.

This commit is contained in:
2026-09-23 12:49:55 +02:00
parent 2a6b552725
commit 9ce77ad817
+46 -15
View File
@@ -83,6 +83,9 @@ if [ "$DO_LINKS" = true ]; then
CREATED=0
SKIPPED=0
# Modern shell & editor setup
link_file "$DOTFILES_DIR/config/niri/config.kdl" "$HOME/.config/niri/config.kdl"
link_file "$DOTFILES_DIR/config/niri/dms/binds.kdl" "$HOME/.config/niri/dms/binds.kdl"
link_file "$DOTFILES_DIR/config/fish/config.fish" "$HOME/.config/fish/config.fish"
link_file "$DOTFILES_DIR/config/vim" "$HOME/.vim"
link_file "$DOTFILES_DIR/config/kanata" "$HOME/.config/kanata"
@@ -110,20 +113,48 @@ if [ "$DO_INSTALL" = true ]; then
fi
if [ "$DO_INSTALL" = true ]; then
# -----------------------------------------------------------------------------
## ADD NONFREE REPOS
# -----------------------------------------------------------------------------
echo "📦 Checking nonfree repositories..."
REPO_PACKAGES=(void-repo-nonfree)
# Only add multilib-nonfree on x86_64
if [ "$(uname -m)" = "x86_64" ]; then
REPO_PACKAGES+=(void-repo-multilib-nonfree)
fi
MISSING_REPOS=()
for repo in "${REPO_PACKAGES[@]}"; do
if ! xbps-query -p pkgver "$repo" >/dev/null 2>&1; then
MISSING_REPOS+=("$repo")
fi
done
if [ ${#MISSING_REPOS[@]} -eq 0 ]; then
echo "✅ Nonfree repositories already enabled."
else
echo "📦 Enabling repositories: ${MISSING_REPOS[*]}"
sudo xbps-install -Sy "${MISSING_REPOS[@]}"
fi
echo ""
# -----------------------------------------------------------------------------
## INSTALL REQUIRED PACKAGES
# -----------------------------------------------------------------------------
REQUIRED_PACKAGES=(
# system
fuse3
# system & shell
pfetch fuse3 fish-shell
# network & download
wget curl ca-certificates gnupg rsync
# core utilities
fish git vim fd-find jq fzf ripgrep tree direnv make bat
ark unzip p7zip-full tar gzip bzip2 xz-utils
# core utilities & CLI tools
git vim fd jq fzf ripgrep tree direnv make bat
ark unzip p7zip tar gzip bzip2 xz kanata gitu
# build & dev tools
build-essential valgrind nodejs
# fonts
fonts-noto-core fonts-noto-color-emoji
# desktop portal
xdg-desktop-portal xdg-desktop-portal-gtk
alacritty base-devel valgrind tree-sitter-cli go nodejs
)
MISSING_PACKAGES=()
@@ -131,9 +162,9 @@ if [ "$DO_INSTALL" = true ]; then
echo "🔍 Checking for missing packages..."
echo ""
# Check which packages are missing using dpkg
# Check which packages are missing using xbps-query
for pkg in "${REQUIRED_PACKAGES[@]}"; do
if ! dpkg -s "$pkg" >/dev/null 2>&1; then
if ! xbps-query -p pkgver "$pkg" >/dev/null 2>&1; then
MISSING_PACKAGES+=("$pkg")
fi
done
@@ -141,11 +172,11 @@ if [ "$DO_INSTALL" = true ]; then
if [ ${#MISSING_PACKAGES[@]} -eq 0 ]; then
echo "✅ All required packages are already installed."
else
echo "📦 Syncing package index..."
sudo apt update
echo "📦 Syncing repository indexes..."
sudo xbps-install -S
echo "📦 Installing missing packages: ${MISSING_PACKAGES[*]}"
sudo apt install -y "${MISSING_PACKAGES[@]}"
sudo xbps-install "${MISSING_PACKAGES[@]}"
fi
echo ""