tangled
alpha
login
or
join now
vitorpy.com
/
dotfiles
0
fork
atom
vitorpy's Dotfiles
0
fork
atom
overview
issues
pulls
pipelines
Add Arch Linux package management setup
vitorpy
5 months ago
25f3aa5c
04a66ac8
+94
2 changed files
expand all
collapse all
unified
split
private_dot_config
private_arch
executable_install-packages.sh
packages.txt
+69
private_dot_config/private_arch/executable_install-packages.sh
···
1
1
+
#!/bin/bash
2
2
+
set -e
3
3
+
4
4
+
PACKAGES_FILE="$HOME/.config/arch/packages.txt"
5
5
+
6
6
+
echo "==> Installing Arch packages from $PACKAGES_FILE"
7
7
+
8
8
+
# Install yay (AUR helper) if not present
9
9
+
if ! command -v yay &> /dev/null; then
10
10
+
echo "==> Installing yay AUR helper..."
11
11
+
sudo pacman -S --needed base-devel git
12
12
+
git clone https://aur.archlinux.org/yay.git /tmp/yay
13
13
+
cd /tmp/yay && makepkg -si --noconfirm
14
14
+
cd -
15
15
+
fi
16
16
+
17
17
+
# Parse package list and install
18
18
+
pacman_packages=()
19
19
+
aur_packages=()
20
20
+
flatpak_packages=()
21
21
+
22
22
+
while IFS='|' read -r package source; do
23
23
+
# Skip comments and empty lines
24
24
+
[[ "$package" =~ ^#.*$ ]] && continue
25
25
+
[[ -z "$package" ]] && continue
26
26
+
27
27
+
# Trim whitespace
28
28
+
package=$(echo "$package" | xargs)
29
29
+
source=$(echo "$source" | xargs)
30
30
+
31
31
+
case "$source" in
32
32
+
pacman)
33
33
+
pacman_packages+=("$package")
34
34
+
;;
35
35
+
aur)
36
36
+
aur_packages+=("$package")
37
37
+
;;
38
38
+
flatpak)
39
39
+
flatpak_packages+=("$package")
40
40
+
;;
41
41
+
esac
42
42
+
done < "$PACKAGES_FILE"
43
43
+
44
44
+
# Install pacman packages
45
45
+
if [ ${#pacman_packages[@]} -gt 0 ]; then
46
46
+
echo "==> Installing pacman packages: ${pacman_packages[*]}"
47
47
+
sudo pacman -S --needed --noconfirm "${pacman_packages[@]}"
48
48
+
fi
49
49
+
50
50
+
# Install AUR packages
51
51
+
if [ ${#aur_packages[@]} -gt 0 ]; then
52
52
+
echo "==> Installing AUR packages: ${aur_packages[*]}"
53
53
+
yay -S --needed --noconfirm "${aur_packages[@]}"
54
54
+
fi
55
55
+
56
56
+
# Install flatpak packages
57
57
+
if [ ${#flatpak_packages[@]} -gt 0 ]; then
58
58
+
if ! command -v flatpak &> /dev/null; then
59
59
+
echo "==> Installing flatpak..."
60
60
+
sudo pacman -S --needed --noconfirm flatpak
61
61
+
fi
62
62
+
63
63
+
echo "==> Installing flatpak packages: ${flatpak_packages[*]}"
64
64
+
for pkg in "${flatpak_packages[@]}"; do
65
65
+
flatpak install -y flathub "$pkg"
66
66
+
done
67
67
+
fi
68
68
+
69
69
+
echo "==> All packages installed successfully!"
+25
private_dot_config/private_arch/packages.txt
···
1
1
+
# Arch Linux Package List
2
2
+
# Format: package-name | source (pacman/aur/flatpak)
3
3
+
4
4
+
# Core system
5
5
+
firefox | pacman
6
6
+
fish | pacman
7
7
+
starship | pacman
8
8
+
neovim | pacman
9
9
+
git | pacman
10
10
+
chezmoi | pacman
11
11
+
hyprland | pacman
12
12
+
bitwarden-cli | aur
13
13
+
14
14
+
# Development
15
15
+
vscodium-bin | aur
16
16
+
claude-code | aur
17
17
+
codex-cli | aur
18
18
+
19
19
+
# Communication & Productivity
20
20
+
slack-desktop | aur
21
21
+
tutanota-desktop | flatpak
22
22
+
23
23
+
# Utilities
24
24
+
imagemagick | pacman
25
25
+
wl-clipboard | pacman