dev: automated commit - 2025-06-08 23:28:55
This commit is contained in:
parent
33106ea4a6
commit
0ab9f62ace
13 changed files with 1255 additions and 715 deletions
378
runs/base
378
runs/base
|
@ -1,199 +1,237 @@
|
|||
#!/usr/bin/env bash
|
||||
# NAME: Install base system packages
|
||||
# NAME: Install base system packages with hardware detection
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
AUR_HELPER="paru"
|
||||
|
||||
if ! command -v $AUR_HELPER &>/dev/null; then
|
||||
echo "[ERROR] $AUR_HELPER not found. Install it first."
|
||||
# Source common functions
|
||||
source "$(dirname "$0")/../common.sh" || {
|
||||
echo "[ERROR] Could not source common.sh" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Installing organized system packages..."
|
||||
check_requirements() {
|
||||
if ! command_exists paru; then
|
||||
log_error "paru not found. Install it first"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 🔧 DETECT HARDWARE
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
CPU_VENDOR=$(lscpu | grep "Vendor ID" | awk '{print $3}')
|
||||
GPU_INFO=$(lspci | grep -i vga)
|
||||
detect_hardware() {
|
||||
local cpu_vendor gpu_info microcode gpu_packages
|
||||
|
||||
echo "Detected CPU: $CPU_VENDOR"
|
||||
echo "Detected GPU: $GPU_INFO"
|
||||
cpu_vendor=$(lscpu | grep "Vendor ID" | awk '{print $3}')
|
||||
gpu_info=$(lspci | grep -i vga)
|
||||
|
||||
# Determine microcode package
|
||||
if [[ "$CPU_VENDOR" == "GenuineIntel" ]]; then
|
||||
MICROCODE="intel-ucode"
|
||||
echo "→ Using Intel microcode"
|
||||
elif [[ "$CPU_VENDOR" == "AuthenticAMD" ]]; then
|
||||
MICROCODE="amd-ucode"
|
||||
echo "→ Using AMD microcode"
|
||||
else
|
||||
MICROCODE=""
|
||||
echo "→ Unknown CPU vendor, skipping microcode"
|
||||
fi
|
||||
log_info "Detected CPU: $cpu_vendor"
|
||||
log_info "Detected GPU: $gpu_info"
|
||||
|
||||
# Determine GPU drivers
|
||||
GPU_PACKAGES=""
|
||||
if echo "$GPU_INFO" | grep -qi "amd\|radeon"; then
|
||||
GPU_PACKAGES="xf86-video-amdgpu vulkan-radeon lib32-vulkan-radeon opencl-mesa lib32-opencl-mesa"
|
||||
echo "→ Using AMD GPU drivers"
|
||||
elif echo "$GPU_INFO" | grep -qi "intel"; then
|
||||
GPU_PACKAGES="xf86-video-intel vulkan-intel lib32-vulkan-intel intel-media-driver"
|
||||
echo "→ Using Intel GPU drivers"
|
||||
elif echo "$GPU_INFO" | grep -qi "nvidia"; then
|
||||
GPU_PACKAGES="nvidia nvidia-utils lib32-nvidia-utils nvidia-settings"
|
||||
echo "→ Using NVIDIA drivers (you may want to review this)"
|
||||
else
|
||||
echo "→ Unknown GPU, using generic drivers"
|
||||
fi
|
||||
# Determine microcode package
|
||||
case "$cpu_vendor" in
|
||||
"GenuineIntel")
|
||||
microcode="intel-ucode"
|
||||
log_info "Using Intel microcode"
|
||||
;;
|
||||
"AuthenticAMD")
|
||||
microcode="amd-ucode"
|
||||
log_info "Using AMD microcode"
|
||||
;;
|
||||
*)
|
||||
microcode=""
|
||||
log_warn "Unknown CPU vendor, skipping microcode"
|
||||
;;
|
||||
esac
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 🔧 SYSTEM BASE
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing system base..."
|
||||
BASE_PACKAGES="base base-devel sudo stow linux-cachyos linux-cachyos-headers linux-firmware efibootmgr efitools mkinitcpio grub systemd-boot-manager"
|
||||
# Determine GPU drivers
|
||||
gpu_packages=""
|
||||
if echo "$gpu_info" | grep -qi "amd\|radeon"; then
|
||||
gpu_packages="xf86-video-amdgpu vulkan-radeon lib32-vulkan-radeon opencl-mesa lib32-opencl-mesa"
|
||||
log_info "Using AMD GPU drivers"
|
||||
elif echo "$gpu_info" | grep -qi "intel"; then
|
||||
gpu_packages="xf86-video-intel vulkan-intel lib32-vulkan-intel intel-media-driver"
|
||||
log_info "Using Intel GPU drivers"
|
||||
elif echo "$gpu_info" | grep -qi "nvidia"; then
|
||||
gpu_packages="nvidia nvidia-utils lib32-nvidia-utils nvidia-settings"
|
||||
log_info "Using NVIDIA drivers"
|
||||
else
|
||||
log_warn "Unknown GPU, using generic drivers"
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ -n "$MICROCODE" ]]; then
|
||||
BASE_PACKAGES="$BASE_PACKAGES $MICROCODE"
|
||||
fi
|
||||
install_base_system() {
|
||||
log_info "Installing system base packages"
|
||||
|
||||
$AUR_HELPER -S --noconfirm --needed $BASE_PACKAGES
|
||||
local base_packages="base base-devel sudo stow linux-cachyos linux-cachyos-headers linux-firmware efibootmgr efitools mkinitcpio grub systemd-boot-manager"
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 🌐 NETWORKING & BLUETOOTH
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing networking..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
networkmanager networkmanager-openvpn network-manager-applet \
|
||||
dhclient dnsmasq iptables-nft iwd wpa_supplicant wireless-regdb \
|
||||
bluez-libs blueman openssh
|
||||
if [[ -n "$microcode" ]]; then
|
||||
base_packages="$base_packages $microcode"
|
||||
fi
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 🔊 AUDIO & VIDEO
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing audio/video..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
pipewire pipewire-alsa pipewire-pulse wireplumber \
|
||||
pavucontrol alsa-firmware alsa-plugins alsa-utils \
|
||||
gst-libav gst-plugin-pipewire gst-plugins-bad gst-plugins-ugly \
|
||||
mpv ffmpegthumbnailer
|
||||
paru -S --needed --overwrite="*" $base_packages
|
||||
}
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 🎨 FONTS & THEMES
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing fonts and themes..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
adobe-source-han-sans-cn-fonts adobe-source-han-sans-jp-fonts \
|
||||
adobe-source-han-sans-kr-fonts adobe-source-serif-fonts \
|
||||
awesome-terminal-fonts inter-font noto-fonts noto-fonts-cjk noto-fonts-emoji \
|
||||
ttf-bitstream-vera ttf-dejavu ttf-fantasque-nerd ttf-fira-code ttf-fira-mono \
|
||||
ttf-fira-sans ttf-font-awesome-5 ttf-liberation ttf-linux-libertine \
|
||||
ttf-meslo-nerd ttf-ms-win11-auto ttf-opensans otf-font-awesome-5 otf-libertinus \
|
||||
papirus-icon-theme rose-pine-gtk-theme
|
||||
install_networking() {
|
||||
log_info "Installing networking packages"
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 💻 DEVELOPMENT TOOLS
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing development tools..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
git git-lfs git-crypt github-cli lazygit \
|
||||
go go-task python python-defusedxml python-packaging \
|
||||
python-protobuf python-pynvim python-pywlroots lua luarocks \
|
||||
ccls cmake ninja neovim-nightly-bin
|
||||
paru -S --needed \
|
||||
networkmanager networkmanager-openvpn network-manager-applet \
|
||||
dhclient dnsmasq iptables-nft iwd wpa_supplicant wireless-regdb \
|
||||
bluez-libs blueman openssh
|
||||
}
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 🛠️ CLI UTILITIES
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing CLI utilities..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
bat btop duf dysk dust eza fd fzf glances glow httpie ncdu \
|
||||
plocate ripgrep tealdeer the_silver_searcher tmux wget \
|
||||
xdg-user-dirs zoxide zellij yazi yq zsh
|
||||
install_audio_video() {
|
||||
log_info "Installing audio and video packages"
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 🪟 WINDOW MANAGERS & DESKTOP
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing window managers..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
swaybg swayfx-git swayidle swaylock-effects waybar \
|
||||
wlogout wdisplays wl-clipboard rofi-lbonn-wayland-git
|
||||
paru -S --needed \
|
||||
pipewire pipewire-alsa pipewire-pulse wireplumber \
|
||||
pavucontrol alsa-firmware alsa-plugins alsa-utils \
|
||||
gst-libav gst-plugin-pipewire gst-plugins-bad gst-plugins-ugly \
|
||||
mpv ffmpegthumbnailer
|
||||
}
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 🌍 GUI APPLICATIONS
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing GUI applications..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
chromium zen-browser-bin \
|
||||
legcord-bin slack-desktop teams-for-linux-bin \
|
||||
obs-studio obsidian sublime-merge dbeaver \
|
||||
libreoffice-fresh kitty nemo nemo-fileroller
|
||||
install_fonts_themes() {
|
||||
log_info "Installing fonts and themes"
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 📁 SYSTEM UTILITIES
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing system utilities..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
brightnessctl cronie cups cups-pdf gamemode gvfs gvfs-afc gvfs-google \
|
||||
gvfs-gphoto2 gvfs-mtp gvfs-nfs gvfs-smb haveged hdparm less lvm2 \
|
||||
man-db man-pages meld modemmanager mtools mupdf netctl nss-mdns \
|
||||
ntfs-3g ntp nvme-cli opencl-mesa pacman-contrib pass pika-backup \
|
||||
pkgfile power-profiles-daemon pv reflector remmina rsync rtkit \
|
||||
samba seahorse sg3_utils smartmontools snapper solaar steam \
|
||||
steam-native-runtime syncthing system-config-printer timeshift \
|
||||
transmission-qt ufw unrar unzip upower usb_modeswitch usbutils \
|
||||
vi vorta w3m which xdg-desktop-portal xdg-desktop-portal-gnome \
|
||||
xdg-desktop-portal-gtk xdg-desktop-portal-wlr yad zenity
|
||||
paru -S --needed \
|
||||
adobe-source-han-sans-cn-fonts adobe-source-han-sans-jp-fonts \
|
||||
adobe-source-han-sans-kr-fonts adobe-source-serif-fonts \
|
||||
awesome-terminal-fonts inter-font noto-fonts noto-fonts-cjk noto-fonts-emoji \
|
||||
ttf-bitstream-vera ttf-dejavu ttf-fantasque-nerd ttf-fira-code ttf-fira-mono \
|
||||
ttf-fira-sans ttf-font-awesome-5 ttf-liberation ttf-linux-libertine \
|
||||
ttf-meslo-nerd ttf-ms-win11-auto ttf-opensans otf-font-awesome-5 otf-libertinus \
|
||||
papirus-icon-theme rose-pine-gtk-theme
|
||||
}
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 🎮 GAMING & GRAPHICS
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing gaming and graphics..."
|
||||
GAMING_BASE="lib32-alsa-lib lib32-alsa-plugins lib32-gamemode lib32-libpulse lib32-mesa lib32-openal lib32-vkd3d lib32-vulkan-mesa-layers vkd3d vulkan-mesa-layers vulkan-tools vulkan-validation-layers wine protonup-qt"
|
||||
install_development() {
|
||||
log_info "Installing development tools"
|
||||
|
||||
if [[ -n "$GPU_PACKAGES" ]]; then
|
||||
$AUR_HELPER -S --noconfirm --needed $GAMING_BASE $GPU_PACKAGES
|
||||
else
|
||||
$AUR_HELPER -S --noconfirm --needed $GAMING_BASE
|
||||
fi
|
||||
paru -S --needed \
|
||||
git git-lfs git-crypt github-cli lazygit \
|
||||
go go-task python python-defusedxml python-packaging \
|
||||
python-protobuf python-pynvim python-pywlroots lua luarocks \
|
||||
ccls cmake ninja neovim-nightly-bin
|
||||
}
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 📱 MOBILE & HARDWARE
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing hardware support..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
sof-firmware xf86-input-libinput xfsprogs \
|
||||
xorg-server xorg-xdpyinfo xorg-xhost xorg-xinit xorg-xinput \
|
||||
xorg-xkill xorg-xrandr xorg-xwayland
|
||||
install_cli_utilities() {
|
||||
log_info "Installing CLI utilities"
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# ☁️ CLOUD & DEVOPS
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing cloud and DevOps tools..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
aws-cli aws-session-manager-plugin insomnia-bin \
|
||||
kubectl kubectx kubefwd-bin ngrok postgresql
|
||||
paru -S --needed \
|
||||
bat btop duf dysk dust eza fd fzf glances glow httpie ncdu \
|
||||
plocate ripgrep tealdeer the_silver_searcher tmux wget \
|
||||
xdg-user-dirs zoxide yazi yq zsh
|
||||
}
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 📚 DOCUMENT & PRODUCTIVITY
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing document tools..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
pandoc-cli texinfo wkhtmltopdf-bin zathura zathura-pdf-mupdf \
|
||||
swappy wf-recorder
|
||||
install_window_managers() {
|
||||
log_info "Installing window managers and desktop environment"
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 🔐 SECURITY & ENCRYPTION
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing security tools..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
yubico-authenticator-bin yubikey-manager-qt
|
||||
paru -S --needed \
|
||||
swaybg swayfx-git swayidle swaylock-effects waybar \
|
||||
wlogout wdisplays wl-clipboard rofi-lbonn-wayland-git
|
||||
}
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 📦 PACKAGE MANAGERS & MISC
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
echo "Installing package managers and misc..."
|
||||
$AUR_HELPER -S --noconfirm --needed \
|
||||
pyenv watchman-bin wimlib
|
||||
install_gui_applications() {
|
||||
log_info "Installing GUI applications"
|
||||
|
||||
tldr --update
|
||||
paru -S --needed \
|
||||
chromium zen-browser-bin \
|
||||
legcord-bin slack-desktop teams-for-linux-bin \
|
||||
obs-studio obsidian sublime-merge dbeaver \
|
||||
libreoffice-fresh kitty nemo nemo-fileroller
|
||||
}
|
||||
|
||||
install_system_utilities() {
|
||||
log_info "Installing system utilities"
|
||||
|
||||
paru -S --needed \
|
||||
brightnessctl cronie cups cups-pdf gamemode gvfs gvfs-afc gvfs-google \
|
||||
gvfs-gphoto2 gvfs-mtp gvfs-nfs gvfs-smb haveged hdparm less lvm2 \
|
||||
man-db man-pages meld modemmanager mtools mupdf netctl nss-mdns \
|
||||
ntfs-3g ntp nvme-cli opencl-mesa pacman-contrib pass pika-backup \
|
||||
pkgfile power-profiles-daemon pv reflector remmina rsync rtkit \
|
||||
samba seahorse sg3_utils smartmontools snapper solaar steam \
|
||||
steam-native-runtime syncthing system-config-printer \
|
||||
transmission-qt ufw unrar unzip upower usb_modeswitch usbutils \
|
||||
vi vorta w3m which xdg-desktop-portal xdg-desktop-portal-gnome \
|
||||
xdg-desktop-portal-gtk xdg-desktop-portal-wlr yad zenity
|
||||
}
|
||||
|
||||
install_gaming_graphics() {
|
||||
log_info "Installing gaming and graphics packages"
|
||||
|
||||
local gaming_base="lib32-alsa-lib lib32-alsa-plugins lib32-gamemode lib32-libpulse lib32-mesa lib32-openal lib32-vkd3d lib32-vulkan-mesa-layers vkd3d vulkan-mesa-layers vulkan-tools vulkan-validation-layers wine protonup-qt"
|
||||
|
||||
if [[ -n "$gpu_packages" ]]; then
|
||||
paru -S --needed $gaming_base $gpu_packages
|
||||
else
|
||||
paru -S --needed $gaming_base
|
||||
fi
|
||||
}
|
||||
|
||||
install_hardware_support() {
|
||||
log_info "Installing hardware support"
|
||||
|
||||
paru -S --needed \
|
||||
sof-firmware xf86-input-libinput xfsprogs \
|
||||
xorg-server xorg-xdpyinfo xorg-xhost xorg-xinit xorg-xinput \
|
||||
xorg-xkill xorg-xrandr xorg-xwayland
|
||||
}
|
||||
|
||||
install_cloud_devops() {
|
||||
log_info "Installing cloud and DevOps tools"
|
||||
|
||||
paru -S --needed \
|
||||
aws-cli aws-session-manager-plugin insomnia-bin \
|
||||
kubectl kubectx kubefwd-bin ngrok postgresql
|
||||
}
|
||||
|
||||
install_document_tools() {
|
||||
log_info "Installing document and productivity tools"
|
||||
|
||||
paru -S --needed \
|
||||
pandoc-cli texinfo wkhtmltopdf-bin zathura zathura-pdf-mupdf \
|
||||
swappy wf-recorder
|
||||
}
|
||||
|
||||
install_security_tools() {
|
||||
log_info "Installing security tools"
|
||||
|
||||
paru -S --needed \
|
||||
yubico-authenticator-bin yubikey-manager-qt
|
||||
}
|
||||
|
||||
install_misc_packages() {
|
||||
log_info "Installing miscellaneous packages"
|
||||
|
||||
paru -S --needed \
|
||||
pyenv watchman-bin wimlib \
|
||||
slurp grim swaync gum nwg-look lxsession colordiff
|
||||
|
||||
log_info "Updating tldr database"
|
||||
tldr --update
|
||||
}
|
||||
|
||||
main() {
|
||||
init_script
|
||||
|
||||
check_requirements
|
||||
detect_hardware
|
||||
|
||||
install_base_system
|
||||
install_networking
|
||||
install_audio_video
|
||||
install_fonts_themes
|
||||
install_development
|
||||
install_cli_utilities
|
||||
install_window_managers
|
||||
install_gui_applications
|
||||
install_system_utilities
|
||||
install_gaming_graphics
|
||||
install_hardware_support
|
||||
install_cloud_devops
|
||||
install_document_tools
|
||||
install_security_tools
|
||||
install_misc_packages
|
||||
|
||||
finish_script 0
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue