forked from RP1/RaveOS-arch
added auto ucode and nvidia options
This commit is contained in:
parent
b8b6adb794
commit
d7b897239d
1 changed files with 48 additions and 5 deletions
45
rp-os-ae.sh
45
rp-os-ae.sh
|
@ -10,6 +10,11 @@ bold=$(tput bold) # ${bold}
|
|||
normal=$(tput sgr0) # ${normal}
|
||||
yellow=$(tput setaf 3) # ${yellow}
|
||||
|
||||
# Variables
|
||||
CPU=$(lscpu | grep "AMD" -c)
|
||||
cachy=$(ls /boot/ | grep "cachy" -c)
|
||||
nVidia=$(lspci -P | grep "NVIDIA" -c)
|
||||
|
||||
|
||||
# Deleting password for the script to run uninterrapted
|
||||
|
||||
|
@ -22,7 +27,7 @@ yellow=$(tput setaf 3) # ${yellow}
|
|||
|
||||
# Installing packages
|
||||
|
||||
sudo pacman -S gnome-terminal gnome-session gdm gnome-disk-utility gnome-system-monitor eog flatpak base-devel bash-completion gedit gnome-calculator baobab ffmpeg git gnome-control-center gnome-browser-connector xdg-desktop-portal xdg-desktop-portal-gnome xdg-desktop-portal-gtk xdg-desktop-portal-wlr ttf-ubuntu-font-family gnome-settings-daemon unzip wget glib2 glib2-devel spice-vdagent hblock nano qt5-wayland meson rsync zenity amd-ucode intel-ucode mesa-utils --noconfirm
|
||||
sudo pacman -S gnome-terminal gnome-session gdm gnome-disk-utility gnome-system-monitor eog flatpak base-devel bash-completion gedit gnome-calculator baobab ffmpeg git gnome-control-center gnome-browser-connector xdg-desktop-portal xdg-desktop-portal-gnome xdg-desktop-portal-gtk xdg-desktop-portal-wlr ttf-ubuntu-font-family gnome-settings-daemon unzip wget glib2 glib2-devel spice-vdagent hblock nano qt5-wayland meson rsync zenity amd-ucode intel-ucode mesa-utils gvfs gvfs-smb --noconfirm
|
||||
sudo systemctl enable gdm.service
|
||||
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target geoclue.service
|
||||
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
|
@ -76,15 +81,49 @@ yellow=$(tput setaf 3) # ${yellow}
|
|||
sleep 2
|
||||
cd -
|
||||
sudo pacman -S linux-cachyos linux-cachyos-headers --noconfirm
|
||||
sleep 3
|
||||
|
||||
# Compatibility Detection
|
||||
if [[ $cachy -gt 0 ]]; then
|
||||
sudo kernel-install add-all
|
||||
sudo mv /boot/loader/entries/*-cachyos.conf /boot/loader/entries/linux-cachyos.conf
|
||||
echo "default linux-cachyos.conf" | sudo tee -a /boot/loader/loader.conf
|
||||
sudo sed -i 's/timeout 3/timeout 0/' /boot/loader/loader.conf
|
||||
else
|
||||
sudo pacman -S linux-zen linux-zen-headers --noconfirm
|
||||
sudo kernel-install add-all
|
||||
sudo mv /boot/loader/entries/*-zen.conf /boot/loader/entries/linux-zen.conf
|
||||
echo "default linux-zen.conf" | sudo tee -a /boot/loader/loader.conf
|
||||
sudo sed -i 's/timeout 3/timeout 0/' /boot/loader/loader.conf
|
||||
fi
|
||||
|
||||
echo ${bold}${yellow}CachyOS - Gaming Kernel ${normal}installed.
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
# UCode installer
|
||||
if [[ $CPU -gt 0 ]]; then
|
||||
sudo pacman -S amd-ucode --noconfirm
|
||||
else
|
||||
sudo pacman -S intel-ucode --noconfirm
|
||||
fi
|
||||
|
||||
# Adding ucode to boot entries
|
||||
if [[ $CPU -gt 0 ]]; then
|
||||
echo "initrd /amd-ucode.img" | sudo tee -a /boot/loader/entries/*.conf
|
||||
else
|
||||
echo "initrd /intel-ucode.img" | sudo tee -a /boot/loader/entries/*.conf
|
||||
fi
|
||||
|
||||
# nVidia
|
||||
if [[ $nVidia -gt 0 && $cachy -gt 0 ]]; then
|
||||
sudo pacman -S linux-cachyos-nvidia --noconfirm
|
||||
elif [[ $nVidia -gt 0 && $cachy -eq 0 ]]; then
|
||||
sudo pacman -S nvidia-dkms nvidia-utils nvidia-settings --noconfirm
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# RaveOS Cosmetics
|
||||
|
||||
|
@ -113,6 +152,10 @@ SystemAccount=false" | sudo tee /var/lib/AccountsService/users/$USER
|
|||
sudo mkdir -p /home/$USER/.config/gtk-4.0
|
||||
sudo chown -R $USER:$GROUP /home/$USER/
|
||||
cp -a gtk.css /home/$USER/.config/gtk-4.0/
|
||||
sudo sed -i 's/#en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen
|
||||
sudo sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
|
||||
sudo sed -i 's/#hu_HU.UTF-8 UTF-8/hu_HU.UTF-8 UTF-8/' /etc/locale.gen
|
||||
sudo locale-gen
|
||||
|
||||
set-gdm-theme set Yaru-purple-dark /usr/share/backgrounds/raveos-bg.png
|
||||
|
||||
|
|
Loading…
Reference in a new issue