|
@@ -52,47 +52,29 @@ pacman-key --populate archlinux
|
|
|
curl -O https://download.sublimetext.com/sublimehq-pub.gpg && pacman-key --add sublimehq-pub.gpg && pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg
|
|
|
[ $(grep -c "sublime-text" /etc/pacman.conf) -eq 0 ] && echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | tee -a /etc/pacman.conf
|
|
|
|
|
|
-# update and install all packages
|
|
|
-pacman -Syu --noconfirm sudo bash-completion man-db tmux vim linux-firmware linux-headers dkms smartmontools cryptsetup usbutils btrfs-progs gvfs gvfs-mtp gvfs-afc android-udev dmidecode parted pkgfile pkgconf bison gcc gcc-libs cmake ccache ncurses xmlstarlet jq at bc cronie iptables rsync dhcpcd inetutils net-tools openssh sshfs ntp wget curl wireless_tools bluez bluez-utils lzop unzip p7zip xz unrar unace lrzip arj git mercurial subversion bzr postgresql mesa lib32-mesa dbus polkit xorg-server xorg-server-devel xorg-xinit xorg-xinput xorg-xdpyinfo xorg-xprop xdotool xsel patchelf libpng12 lib32-libpng12 pulseaudio libpulse lib32-libpulse openal lib32-openal giflib lib32-giflib mpg123 lib32-mpg123 v4l-utils lib32-v4l-utils opencl-icd-loader lib32-opencl-icd-loader libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs arandr feh hsetroot openbox archlinux-xdg-menu picom xarchiver innoextract pavucontrol pasystray xdg-utils xdg-user-dirs tint2 conky pcmanfm gmrun rxvt-unicode urxvt-perls gnome-themes-extra gnome-icon-theme arc-gtk-theme gtk-engines gtk-engine-murrine lxappearance graphicsmagick imagemagick lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libexif ffmpeg ffmpegthumbnailer tumbler joyutils evtest lm_sensors lshw gparted psensor gparted hardinfo fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-liberation ttf-hanazono mpv openshot gimp krita transmission-cli evince viewnior virtualbox-host-modules-arch virtualbox vagrant python-pip python-setuptools sublime-text stress lxsession yt-dlp
|
|
|
+# put all packages into an environment variable that we can add to
|
|
|
+export PACKAGES="sudo bash-completion man-db tmux vim linux-firmware linux-headers dkms smartmontools cryptsetup usbutils btrfs-progs gvfs gvfs-mtp gvfs-afc android-udev dmidecode parted pkgfile pkgconf bison gcc gcc-libs cmake ccache ncurses xmlstarlet jq at bc cronie iptables rsync dhcpcd inetutils net-tools openssh sshfs ntp wget curl wireless_tools bluez bluez-utils lzop unzip p7zip xz unrar unace lrzip arj git mercurial subversion bzr postgresql mesa lib32-mesa dbus polkit xorg-server xorg-server-devel xorg-xinit xorg-xinput xorg-xdpyinfo xorg-xprop xdotool xsel patchelf libpng12 lib32-libpng12 pulseaudio libpulse lib32-libpulse openal lib32-openal giflib lib32-giflib mpg123 lib32-mpg123 v4l-utils lib32-v4l-utils opencl-icd-loader lib32-opencl-icd-loader libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs arandr feh hsetroot openbox archlinux-xdg-menu picom xarchiver innoextract pavucontrol pasystray xdg-utils xdg-user-dirs tint2 conky pcmanfm gmrun rxvt-unicode urxvt-perls gnome-themes-extra gnome-icon-theme arc-gtk-theme gtk-engines gtk-engine-murrine lxappearance graphicsmagick imagemagick lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libexif ffmpeg ffmpegthumbnailer tumbler joyutils evtest lm_sensors lshw gparted psensor gparted hardinfo fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-liberation ttf-hanazono mpv openshot gimp krita transmission-cli evince viewnior virtualbox-host-modules-arch virtualbox vagrant python-pip python-setuptools sublime-text stress lxsession yt-dlp firefox obs-studio dia mednafen mame ppsspp lutris wine-staging winetricks steam discord libva-mesa-driver lib32-libva-mesa-driver lib32-mesa-vdpau vulkan-tools vulkan-icd-loader lib32-vulkan-icd-loader"
|
|
|
|
|
|
-# install base configuration files from repository
|
|
|
-[ -d /srv/arch-desktop/install ] || git clone https://git.caseydelorme.com/cdelorme/arch-desktop /srv/arch-desktop
|
|
|
-rsync -Pav /srv/arch-desktop/install/ /
|
|
|
-mkdir -p /etc/skel/.config/pulse
|
|
|
-mkdir -p /etc/skel/{desktop,downloads,public,public/templates,documents,music,pictures,videos,git}
|
|
|
-sed "/module-suspend-on-idle/d" /etc/pulse/default.pa > /etc/skel/.config/pulse/default.pa
|
|
|
-# @note: we may want to avoid disabling this on laptops
|
|
|
-sed -i "/module-switch-on-port-available/d" /etc/skel/.config/pulse/default.pa
|
|
|
-rsync -Pav /etc/skel/ "$(getent passwd root | cut -d: -f6)/"
|
|
|
-sed -i "/ssh-add/d" "$(getent passwd root | cut -d: -f6)/.bashrc"
|
|
|
+# conditionally add wireless networking packages
|
|
|
+[ -d "/sys/class/net/${active_network_device}/wireless" ] && PACKAGES="$PACKAGES connman wpa_supplicant openvpn ethtool iwd pptpclient"
|
|
|
|
|
|
-# if the active network device is wireless install connman
|
|
|
-[ -d "/sys/class/net/${active_network_device}/wireless" ] && pacman -Syu connman wpa_supplicant openvpn ethtool iwd pptpclient && systemctl enable connman
|
|
|
+# add CPU unicode package based on model
|
|
|
+[ $(grep -c "Intel" /proc/cpuinfo) -gt 0 ] && PACKAGES="$PACKAGES intel-ucode"
|
|
|
+[ $(grep -c "AMD" /proc/cpuinfo) -gt 0 ] && PACKAGES="$PACKAGES amd-ucode"
|
|
|
|
|
|
-# install protontricks
|
|
|
-python3 -m pip install protontricks
|
|
|
-
|
|
|
-# enable ccache and optimize cores for AUR
|
|
|
-sed -i 's/!ccache/ccache/' /etc/makepkg.conf
|
|
|
-sed -i 's/^#MAKEFLAGS.*/MAKEFLAGS="-j$(($(nproc) + 1)) -l$(nproc)"/' /etc/makepkg.conf
|
|
|
-
|
|
|
-# install CPU unicode based on model
|
|
|
-[ $(grep -c "Intel" /proc/cpuinfo) -gt 0 ] && pacman -Syu --noconfirm intel-ucode
|
|
|
-[ $(grep -c "AMD" /proc/cpuinfo) -gt 0 ] && pacman -Syu --noconfirm amd-ucode
|
|
|
-
|
|
|
-# install GPU related packages
|
|
|
+# add appropriate GPU related packages
|
|
|
if [ $(lspci | grep -i "vga" | grep -ci "amd") -gt 0 ]; then
|
|
|
- pacman -Syu --noconfirm xf86-video-amdgpu vulkan-radeon lib32-vulkan-radeon mesa-vdpau
|
|
|
+ PACKAGES="$PACKAGES xf86-video-amdgpu vulkan-radeon lib32-vulkan-radeon mesa-vdpau"
|
|
|
|
|
|
# update modules to load
|
|
|
[ $(grep -c "amd" /etc/mkinitcpio.conf) -eq 0 ] && sed -i 's/MODULES=(\(.*\))/MODULES=(\1 amdgpu radeon)/' /etc/mkinitcpio.conf
|
|
|
elif [ $(lspci | grep -i "vga" | grep -ci "intel") -gt 0 ]; then
|
|
|
- pacman -Syu --noconfirm xf86-video-intel vulkan-intel lib32-vulkan-intel mesa-vdpau
|
|
|
+ PACKAGES="$PACKAGES xf86-video-intel vulkan-intel lib32-vulkan-intel mesa-vdpau"
|
|
|
|
|
|
# update modules to load
|
|
|
[ $(grep -c "amd" /etc/mkinitcpio.conf) -eq 0 ] && sed -i 's/MODULES=(\(.*\))/MODULES=(\1 i915)/' /etc/mkinitcpio.conf
|
|
|
elif [ $(lspci | grep -i "vga" | grep -ci "nvidia") -gt 0 ]; then
|
|
|
- pacman -Syu --noconfirm nvidia-dkms libglvnd lib32-libglvnd opencl-nvidia lib32-opencl-nvidia xf86-video-nouveau nvidia-utils lib32-nvidia-utils mesa-vdpau nvidia-settings
|
|
|
+ PACKAGES="$PACKAGES nvidia-dkms libglvnd lib32-libglvnd opencl-nvidia lib32-opencl-nvidia xf86-video-nouveau nvidia-utils lib32-nvidia-utils mesa-vdpau nvidia-settings"
|
|
|
|
|
|
# update modules to load
|
|
|
[ $(grep -c "nvidia" /etc/mkinitcpio.conf) -eq 0 ] && sed -i 's/MODULES=(\(.*\))/MODULES=(\1 nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf
|
|
@@ -101,20 +83,33 @@ elif [ $(lspci | grep -i "vga" | grep -ci "nvidia") -gt 0 ]; then
|
|
|
echo -e "[Trigger]\nOperation=Install\nOperation=Upgrade\nOperation=Remove\nType=Package\nTarget=nvidia\n\n[Action]\nDepends=mkinitcpio\nWhen=PostTransaction\nExec=/usr/bin/mkinitcpio -P" > /etc/pacman.d/hooks/nvidia.hook
|
|
|
fi
|
|
|
|
|
|
-# install packages dependent on gpu packages
|
|
|
-pacman -Syu --noconfirm firefox obs-studio dia mednafen mame ppsspp lutris wine-staging winetricks steam discord libva-mesa-driver lib32-libva-mesa-driver lib32-mesa-vdpau vulkan-tools vulkan-icd-loader lib32-vulkan-icd-loader
|
|
|
-
|
|
|
-# install laptop packages and optimize system configuration
|
|
|
-# @note: alternatively if `/sys/class/power_supply/BAT0` exists, we have a battery, probably laptop
|
|
|
-export chassistype=$(dmidecode --string chassis-type)
|
|
|
-if [[ "$chassistype" = "Laptop" || "$chassistype" = "Portable" || "$chassistype" = "Notebook" || "$chassistype" = "Sub Notebook" ]]; then
|
|
|
- pacman -Syu --noconfirm xf86-input-synaptics acpid hdparm sdparm acpilight connman wpa_supplicant openvpn ethtool iwd pptpclient tlp
|
|
|
- sed "s/panel_items = LTSC/panel_items = LTSBC/g" /etc/skel/.config/tint2/tint2rc > /etc/skel/.config/tint2/tint2rc
|
|
|
- systemctl enable tlp
|
|
|
- systemctl enable connman
|
|
|
- systemctl enable acpid
|
|
|
+# conditionally install laptop packages
|
|
|
+if [ -e /sys/class/power_supply/BAT0 ]; then
|
|
|
+ PACKAGES="$PACKAGES xf86-input-synaptics acpid acpilight tlp"
|
|
|
+ sed "s/panel_items = LTSC/panel_items = LTSBC/g" /srv/arch-desktop/install/etc/skel/.config/tint2/tint2rc > /srv/arch-desktop/install/etc/skel/.config/tint2/tint2rc
|
|
|
fi
|
|
|
|
|
|
+# install all packages
|
|
|
+pacman -Syu --noconfirm "$PACKAGES"
|
|
|
+
|
|
|
+# install base configuration files from repository
|
|
|
+[ -d /srv/arch-desktop/install ] || git clone https://git.caseydelorme.com/cdelorme/arch-desktop /srv/arch-desktop
|
|
|
+rsync -Pav /srv/arch-desktop/install/ /
|
|
|
+mkdir -p /etc/skel/.config/pulse
|
|
|
+mkdir -p /etc/skel/{desktop,downloads,public,public/templates,documents,music,pictures,videos,git}
|
|
|
+sed "/module-suspend-on-idle/d" /etc/pulse/default.pa > /etc/skel/.config/pulse/default.pa
|
|
|
+# @note: we may want to avoid disabling this on laptops
|
|
|
+sed -i "/module-switch-on-port-available/d" /etc/skel/.config/pulse/default.pa
|
|
|
+rsync -Pav /etc/skel/ "$(getent passwd root | cut -d: -f6)/"
|
|
|
+sed -i "/ssh-add/d" "$(getent passwd root | cut -d: -f6)/.bashrc"
|
|
|
+
|
|
|
+# install protontricks
|
|
|
+python3 -m pip install protontricks
|
|
|
+
|
|
|
+# enable ccache and optimize cores for AUR
|
|
|
+sed -i 's/!ccache/ccache/' /etc/makepkg.conf
|
|
|
+sed -i 's/^#MAKEFLAGS.*/MAKEFLAGS="-j$(($(nproc) + 1)) -l$(nproc)"/' /etc/makepkg.conf
|
|
|
+
|
|
|
# create a user to install aur packages
|
|
|
export aur_username=$(head /dev/urandom | tr -dc a-z | head -c 13 ; echo '')
|
|
|
useradd -r -m -s /bin/bash $aur_username
|
|
@@ -239,8 +234,11 @@ systemctl enable bluetooth
|
|
|
systemctl enable transmission
|
|
|
systemctl enable postgresql
|
|
|
systemctl enable cronie
|
|
|
+which tlp &> /dev/null && systemctl enable tlp
|
|
|
+which connman &> /dev/null && systemctl enable connman
|
|
|
+which acpid &> /dev/null && systemctl enable acpid
|
|
|
|
|
|
-# try to enable wired connections on reboot
|
|
|
+# attempt to enable dhcp on active network devices on reboot
|
|
|
export active_network_device=$(ip addr | awk '/state UP/ {print $2}' | sed 's/.$//')
|
|
|
[ ! -d "/sys/class/net/${active_network_device}/wireless" ] && (systemctl enable dhcpcd@${active_network_device} || echo "failed to enable dhcp service")
|
|
|
|