From b2e7eaf3af58c743445655f693ba1799755484c4 Mon Sep 17 00:00:00 2001 From: "yuri.kuit" Date: Thu, 7 May 2026 21:35:53 +0200 Subject: [PATCH] arch fix --- v2/arch-full.sh | 2 +- v2/arch-hyprland.sh | 2 +- v2/arch-minimal.sh | 26 ++++++++++++++++++-------- v2/arch-niri.sh | 2 +- v2/arch-workstation.sh | 16 ++++++++++------ v2/arch.sh | 36 ++++++++++++++++++++++++++++++++++-- 6 files changed, 65 insertions(+), 19 deletions(-) diff --git a/v2/arch-full.sh b/v2/arch-full.sh index a97d01f..7d929d1 100755 --- a/v2/arch-full.sh +++ b/v2/arch-full.sh @@ -27,7 +27,7 @@ say_bold() { printf "\n"; printf "%b%s%b\n" "$BOLD" "$*" "$RESET"; } ########################## # Use exported variables from main detection script ########################## -OS="${DETECTED_OS:-debian}" +OS="${DETECTED_OS}" DDE="${DETECTED_DE:-}" DE="${SELECTED_DE:-none}" TWM="${SELECTED_TWM:-none}" diff --git a/v2/arch-hyprland.sh b/v2/arch-hyprland.sh index c377dac..5e67dab 100755 --- a/v2/arch-hyprland.sh +++ b/v2/arch-hyprland.sh @@ -27,7 +27,7 @@ say_bold() { printf "\n"; printf "%b%s%b\n" "$BOLD" "$*" "$RESET"; } ########################## # Use exported variables from main detection script ########################## -OS="${DETECTED_OS:-debian}" +OS="${DETECTED_OS}" DDE="${DETECTED_DE}" DE="${SELECTED_DE:-none}" TWM="${SELECTED_TWM:-none}" diff --git a/v2/arch-minimal.sh b/v2/arch-minimal.sh index 1840b68..9b8ea43 100755 --- a/v2/arch-minimal.sh +++ b/v2/arch-minimal.sh @@ -27,7 +27,7 @@ say_bold() { printf "\n"; printf "%b%s%b\n" "$BOLD" "$*" "$RESET"; } ########################## # Use exported variables from main detection script ########################## -OS="${DETECTED_OS:-arch}" +OS="${DETECTED_OS}" DDE="${DETECTED_DE}" DE="${SELECTED_DE:-none}" TWM="${SELECTED_TWM:-none}" @@ -63,7 +63,7 @@ remove_packages() { say_yellow "Starting minimal setup..." # Create user directories -mkdir -p "$HOME"/{.bin,.fonts,.icons,.themes,DATA} "$HOME/.local/share/"{icons,themes,applications} "$HOME/.config/"{autostart,gtk-{3.0,4.0},variety,fish,neofetch} +mkdir -p "$HOME"/{.bin,.fonts,.icons,.themes,DATA} "$HOME/.local/share/"{icons,themes,applications} "$HOME/.config/"{autostart,gtk-{3.0,4.0},variety,fish,neofetch,fastfetch} # Removing unwanted drivers say_yellow "GET RID OF BROADCOM AND REALTEK DRIVERS" @@ -81,7 +81,7 @@ if pacman -Qi linux &> /dev/null && pacman -Qi linux-headers &> /dev/null; then linux-hardened-headers linux-hardened linux-rt-headers linux-rt linux-rt-lts-headers linux-rt-lts - linux-cachyos-headers linux-cachyos + # linux-cachyos-headers linux-cachyos linux-xanmod-headers linux-xanmod ) remove_package() { @@ -108,23 +108,33 @@ fi remove_packages xf86-video-amdgpu xf86-video-ati xf86-video-fbdev xf86-video-nouveau xf86-video-openchrome xf86-video-vesa # Install essential tools -install_packages wget curl nano fastfetch lolcat bash-completion starship alacritty hwinfo lshw reflector expac betterlockscreen pamac-aur avahi man-db tree xdg-user-dirs rsync time bat unzip chromium +install_packages wget curl nano fastfetch lolcat bash-completion starship alacritty hwinfo lshw reflector expac pamac-aur avahi man-db tree xdg-user-dirs rsync time bat unzip chromium +# temp removed packages: +# betterlockscreen if [ ! -f /usr/bin/duf ]; then install_packages duf fi -install_packages man-db man-pages pacmanlogviewer paru-git yay-git thunar thunar-archive-plugin thunar-volman tree xdg-user-dirs polkit-gnome rate-mirrors rsync time bat ntp nss-mdns +install_packages man-db man-pages pacmanlogviewer thunar thunar-archive-plugin thunar-volman tree xdg-user-dirs polkit-gnome rate-mirrors rsync time bat ntp nss-mdns +# temp removed packages: +# paru-git yay-git #disk-tools install_packages baobab gvfs-smb hddtemp squashfs-tools #archive-managers -install_packages zip gzip p7zip unace unrar unzip file-roller peazip +install_packages zip gzip p7zip unace unrar unzip file-roller +# temp removed packages: +# peazip #theming -install_packages bibata-cursor-theme feh font-manager +install_packages feh font-manager +# temp removed packages: +# bibata-cursor-theme # All the software below will be installed on all desktops -install_packages archlinux-tools dconf-editor devtools hardinfo2 hw-probe logrotate lsb-release powertop inxi acpi plocate most namcap nm-connection-editor python-pylint python-pywal +install_packages archlinux-tools dconf-editor devtools hardinfo2 logrotate lsb-release powertop inxi acpi plocate most namcap nm-connection-editor python-pylint python-pywal +# temp removed packages: +# hw-probe # Optionally handle fonts FONT_DIR="$HOME/.local/share/fonts" diff --git a/v2/arch-niri.sh b/v2/arch-niri.sh index 1f2502b..ced4f95 100755 --- a/v2/arch-niri.sh +++ b/v2/arch-niri.sh @@ -27,7 +27,7 @@ say_bold() { printf "\n"; printf "%b%s%b\n" "$BOLD" "$*" "$RESET"; } ########################## # Use exported variables from main detection script ########################## -OS="${DETECTED_OS:-debian}" +OS="${DETECTED_OS}" DDE="${DETECTED_DE}" DE="${SELECTED_DE:-none}" TWM="${SELECTED_TWM:-none}" diff --git a/v2/arch-workstation.sh b/v2/arch-workstation.sh index 669260a..9d5b191 100755 --- a/v2/arch-workstation.sh +++ b/v2/arch-workstation.sh @@ -27,7 +27,7 @@ say_bold() { printf "\n"; printf "%b%s%b\n" "$BOLD" "$*" "$RESET"; } ########################## # Use exported variables from main detection script ########################## -OS="${DETECTED_OS:-debian}" +OS="${DETECTED_OS}" DDE="${DETECTED_DE:-}" DE="${SELECTED_DE:-none}" TWM="${SELECTED_TWM:-none}" @@ -70,18 +70,22 @@ install_packages git libreoffice-fresh # gitahead-git # editors -install_packages vscodium sublime-text-4 konsole +install_packages vscodium konsole +# temp removed packages: +# sublime-text-4 #internet -install_packages brave-bin insync -# google-chrome discord firefox +install_packages brave-bin +# temp removed packages +# google-chrome discord firefox insync #theming # variety #media -install_packages flameshot-git mpv-full -# vlc gimp inkscape spotify lollypop +install_packages flameshot-git mpv-git +# temp removed packages +# vlc gimp inkscape spotify lollypop mpv-full #shells install_packages zsh zsh-completions zsh-syntax-highlighting oh-my-zsh-git diff --git a/v2/arch.sh b/v2/arch.sh index c374d9e..0bb6527 100755 --- a/v2/arch.sh +++ b/v2/arch.sh @@ -68,9 +68,41 @@ remove_packages() { ########################## # 1. Add repositories if missing and update system ########################## +# Helper function to check and add a repository +add_repo_if_missing() { + local repo_name="$1" + local repo_config="$2" + + if grep -q "\[$repo_name\]" /etc/pacman.conf; then + say_yellow "Repository [$repo_name] already exists. Skipping." + else + say_yellow "Adding [$repo_name] to /etc/pacman.conf..." + # Add a newline and the repo config to the end of the file + echo -e "\n$repo_config" | sudo tee -a /etc/pacman.conf > /dev/null + fi +} + say_yellow "Checking pacman.conf and sources..." -sudo cp /etc/pacman.conf /etc/pacman.conf.bak.$(date +%s) -sudo cp -v "$installed_dir/config-files/pacman.conf" /etc/pacman.conf + +# 1. Create the backup +sudo cp /etc/pacman.conf "/etc/pacman.conf.bak.$(date +%s)" + +# 2. Add yuku_repo +YUKU_BLOCK="[yuku_repo] +SigLevel = Never +Server = https://yurikuit.github.io/\$repo/\$arch" + +add_repo_if_missing "yuku_repo" "$YUKU_BLOCK" + +# 3. Add nemesis_repo +NEMESIS_BLOCK="[nemesis_repo] +SigLevel = Never +Server = https://erikdubois.github.io/\$repo/\$arch" + +add_repo_if_missing "nemesis_repo" "$NEMESIS_BLOCK" + +# 4. Refresh databases +sudo pacman -Sy # Update the system say_gray "Updating the system - sudo pacman -Syyu"