diff --git a/archcrystal.sh b/archcrystal.sh index 01b42c3..b51c8f2 100644 --- a/archcrystal.sh +++ b/archcrystal.sh @@ -1,6 +1,6 @@ #!/bin/bash # Script Name: archcrystal.sh -# Version: 1.3.0 +# Version: 1.3.1 set -a BASE_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" diff --git a/dotfiles/etc/X11/xorg.conf/10-trackpoint.rules b/dotfiles/etc/X11/xorg.conf/10-trackpoint.rules deleted file mode 100644 index bd5994f..0000000 --- a/dotfiles/etc/X11/xorg.conf/10-trackpoint.rules +++ /dev/null @@ -1,11 +0,0 @@ -Section "InputClass" - Identifier "Trackpoint Wheel Emulation" - Driver "evdev" - MatchProduct "TPPS/2 IBM TrackPoint" - MatchDevicePath "/dev/input/event*" - Option "EmulateWheel" "true" - Option "EmulateWheelButton" "2" - Option "Emulate3Buttons" "false" - Option "XAxisMapping" "6 7" - Option "YAxisMapping" "4 5" -EndSection \ No newline at end of file diff --git a/dotfiles/etc/X11/xorg.conf/20-thinkpad.rules b/dotfiles/etc/X11/xorg.conf/20-thinkpad.rules deleted file mode 100644 index bd5994f..0000000 --- a/dotfiles/etc/X11/xorg.conf/20-thinkpad.rules +++ /dev/null @@ -1,11 +0,0 @@ -Section "InputClass" - Identifier "Trackpoint Wheel Emulation" - Driver "evdev" - MatchProduct "TPPS/2 IBM TrackPoint" - MatchDevicePath "/dev/input/event*" - Option "EmulateWheel" "true" - Option "EmulateWheelButton" "2" - Option "Emulate3Buttons" "false" - Option "XAxisMapping" "6 7" - Option "YAxisMapping" "4 5" -EndSection \ No newline at end of file diff --git a/dotfiles/etc/X11/xorg.conf/70-synaptics.conf b/dotfiles/etc/X11/xorg.conf/70-synaptics.conf deleted file mode 100644 index e69de29..0000000 diff --git a/dotfiles/etc/X11/xorg.conf/81-backlight.rules b/dotfiles/etc/X11/xorg.conf/81-backlight.rules deleted file mode 100644 index 9e6e552..0000000 --- a/dotfiles/etc/X11/xorg.conf/81-backlight.rules +++ /dev/null @@ -1,5 +0,0 @@ -# Set backlight level to 8 -SUBSYSTEM=="backlight", -ACTION=="add", -KERNEL=="acpi_video0", -ATTR{brightness}="8" \ No newline at end of file diff --git a/dotfiles/etc/environment b/dotfiles/etc/environment deleted file mode 100644 index 673f6f0..0000000 --- a/dotfiles/etc/environment +++ /dev/null @@ -1,3 +0,0 @@ -GTK_IM_MODULE=ibus -QT_IM_MODULE=ibus -XMODIFIERS=@im=ibus \ No newline at end of file diff --git a/dotfiles/etc/udev/rules.d/99-lowbat.rules b/dotfiles/etc/udev/rules.d/99-lowbat.rules deleted file mode 100644 index 47bfad3..0000000 --- a/dotfiles/etc/udev/rules.d/99-lowbat.rules +++ /dev/null @@ -1,5 +0,0 @@ -# Suspend the system when battery level drops to 5% or lower -SUBSYSTEM=="power_supply", -ATTR{status}=="Discharging", -ATTR{capacity}=="[0-5]", -RUN+="/usr/bin/systemctl hibernate" \ No newline at end of file diff --git a/dotfiles/etc/udev/rules.d/backlight.rules b/dotfiles/etc/udev/rules.d/backlight.rules deleted file mode 100644 index b038685..0000000 --- a/dotfiles/etc/udev/rules.d/backlight.rules +++ /dev/null @@ -1,4 +0,0 @@ -ACTION=="add", -SUBSYSTEM=="backlight", -RUN+="/bin/chgrp video $sys$devpath/brightness", -RUN+="/bin/chmod g+w $sys$devpath/brightness" \ No newline at end of file diff --git a/dotfiles/home/crystal/.Xresources b/dotfiles/home/crystal/.Xresources deleted file mode 100644 index a23a8ad..0000000 --- a/dotfiles/home/crystal/.Xresources +++ /dev/null @@ -1,17 +0,0 @@ -URxvt.inputMethod: ibus -URxvt.preeditType: OverTheSpot -URxvt.font: xft:Hack:style=Regular:size=10 -URxvt.boldFont: xft:Hack:style=Bold:size=10 -URxvt.italicFont: xft:Hack:style=Italic:size=10 -URxvt.boldItalicFont: xft:Hack:style=Bold Italic:size=10 -URxvt.letterSpace: 0 -URxvt.lineSpace: 0 -URxvt.geometry: 92x24 -URxvt.internalBorder: 24 -URxvt.cursorBlink: true -URxvt.cursorUnderline: false -URxvt.saveline: 2048 -URxvt.scrollBar: false -URxvt.scrollBar_right: false -URxvt.urgentOnBell: true -URxvt.depth: 24 \ No newline at end of file diff --git a/dotfiles/home/crystal/.config/i3/.Xmodmap b/dotfiles/home/crystal/.config/i3/.Xmodmap deleted file mode 100644 index e69de29..0000000 diff --git a/dotfiles/home/crystal/.config/i3/config b/dotfiles/home/crystal/.config/i3/config deleted file mode 100644 index e69de29..0000000 diff --git a/dotfiles/home/crystal/.xinitrc b/dotfiles/home/crystal/.xinitrc deleted file mode 100644 index d5298f0..0000000 --- a/dotfiles/home/crystal/.xinitrc +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# user init scripts and settings -[ -r ~/.Xmodmap ] && xmodmap ~/.Xmodmap -[ -r ~/.Xresources ] && xrdb -merge ~/.Xresources -[ -r ~/.xprofile ] && . ~/.xprofile - -exec i3 diff --git a/dotfiles/home/crystal/.zprofile b/dotfiles/home/crystal/.zprofile deleted file mode 100644 index 8ae13d8..0000000 --- a/dotfiles/home/crystal/.zprofile +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then - exec startx -fi diff --git a/dotfiles/home/crystal/.zshrc b/dotfiles/home/crystal/.zshrc deleted file mode 100644 index 51215c4..0000000 --- a/dotfiles/home/crystal/.zshrc +++ /dev/null @@ -1,2 +0,0 @@ -powerline-daemon -q -. /usr/share/powerline/bindings/zsh/powerline.zsh \ No newline at end of file diff --git a/scripts/0-preinstall.sh b/scripts/0-preinstall.sh index 3074063..5cf6fa3 100755 --- a/scripts/0-preinstall.sh +++ b/scripts/0-preinstall.sh @@ -1,60 +1,40 @@ #!/usr/bin/env bash -echo -ne " -------------------------------------------------------------------------- - 0 - Pre-Install -------------------------------------------------------------------------- - -Setting up mirrors for optimal download -" +echo "Setting up installer environment" source $BASE_DIR/setup.conf +pacman -Sy --noconfirm archlinux-keyring + iso=$(curl -4 ifconfig.co/country-iso) timedatectl set-ntp true -pacman -S --noconfirm archlinux-keyring #update keyrings to latest to prevent packages failing to install + +echo -ne "Enabling parallel downloads" pacman -S --noconfirm --needed pacman-contrib sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf + +echo -ne "Setting up $iso mirrors for faster downloads" pacman -S --noconfirm --needed reflector rsync grub cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup -echo -ne " - -Setting up $iso mirrors for faster downloads - -" reflector -a 48 -c "$iso" -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist -mkdir /mnt &>/dev/null # Hiding error message if any -echo -ne " - -Installing Prerequisites +mkdir /mnt &>/dev/null -" +echo -ne "Formatting Disk" pacman -S --noconfirm --needed gptfdisk btrfs-progs glibc -echo -ne " -------------------------------------------------------------------------- - Formating Disk -------------------------------------------------------------------------- -" - -umount -A --recursive /mnt # make sure everything is unmounted before we start -# disk prep -sgdisk -Z ${DISK} # zap all on disk -sgdisk -a 2048 -o ${DISK} # new gpt disk 2048 alignment - -# create partitions -sgdisk -n 1::+1M --typecode=1:ef02 --change-name=1:'BIOSBOOT' ${DISK} # partition 1 (BIOS Boot Partition) -sgdisk -n 2::+1G --typecode=2:ef00 --change-name=2:'EFIBOOT' ${DISK} # partition 2 (UEFI Boot Partition) -sgdisk -n 3::-0 --typecode=3:8300 --change-name=3:'ROOT' ${DISK} # partition 3 (Root), default start, remaining -if [[ ! -d "/sys/firmware/efi" ]]; then # Checking for bios system - sgdisk -A 1:set:2 ${DISK} -fi -partprobe ${DISK} # reread partition table to ensure it is correct +umount -A --recursive /mnt &>/dev/null -# make filesystems -echo -ne " +echo "Wiping Disk" +sgdisk -Z ${DISK} +sgdisk -a 2048 -o ${DISK} -Creating Filesystems +echo "Partitioning Disk" +sgdisk -n 1::+1M --typecode=1:ef02 --change-name=1:'BIOSBOOT' ${DISK} +sgdisk -n 2::+1G --typecode=2:ef00 --change-name=2:'EFIBOOT' ${DISK} +sgdisk -n 3::-0 --typecode=3:8300 --change-name=3:'ROOT' ${DISK} +if [[ ! -d "/sys/firmware/efi" ]]; then + sgdisk -A 1:set:2 ${DISK} +fi +partprobe ${DISK} -" -# @description Creates the btrfs subvolumes. +echo -ne "Creating Filesystems" createsubvolumes() { btrfs subvolume create /mnt/@ btrfs subvolume create /mnt/@home @@ -62,26 +42,17 @@ createsubvolumes() { btrfs subvolume create /mnt/@tmp btrfs subvolume create /mnt/@.snapshots } - -# @description Mount all btrfs subvolumes after root has been mounted. mountallsubvol() { mount -o ${MOUNT_OPTIONS},subvol=@home ${partition3} /mnt/home mount -o ${MOUNT_OPTIONS},subvol=@tmp ${partition3} /mnt/tmp mount -o ${MOUNT_OPTIONS},subvol=@var ${partition3} /mnt/var mount -o ${MOUNT_OPTIONS},subvol=@.snapshots ${partition3} /mnt/.snapshots } - -# @description BTRFS subvolulme creation and mounting. subvolumesetup() { - # create nonroot subvolumes createsubvolumes - # unmount root to remount with subvolume umount /mnt - # mount @ subvolume mount -o ${MOUNT_OPTIONS},subvol=@ ${partition3} /mnt - # make directories home, .snapshots, var, tmp mkdir -p /mnt/{home,var,tmp,.snapshots} - # mount subvolumes mountallsubvol } @@ -93,12 +64,10 @@ else partition3=${DISK}3 fi -# make filesystems EXT4 for / and FAT32 for /boot/efi mkfs.vfat -F32 -n "EFIBOOT" ${partition2} mkfs.ext4 -L ROOT ${partition3} mount -t ext4 ${partition3} /mnt -# mount target mkdir -p /mnt/boot/efi mount -t vfat -L EFIBOOT /mnt/boot/ @@ -109,26 +78,31 @@ if ! grep -qs '/mnt' /proc/mounts; then echo "Rebooting in 1 Second ..." && sleep 1 reboot now fi -echo -ne " - -Arch Install on Main Drive - -" -pacstrap /mnt base base-devel linux linux-firmware linux-headers vim sudo archlinux-keyring wget libnewt --noconfirm --needed +echo -ne "Pacstrapping Archlinux base system" +pacstrap /mnt \ + archlinux-keyring \ + base \ + base-devel \ + git \ + libnewt \ + linux \ + linux-firmware \ + linux-headers \ + sudo \ + vim \ + wget \ + pacman-contrib \ + util-linux + +--noconfirm --needed cp -R ${BASE_DIR} /mnt/root/archcrystal -cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist +echo "Generating FSTAB" genfstab -L /mnt >>/mnt/etc/fstab -echo " - Generated /etc/fstab: -" cat /mnt/etc/fstab -echo -ne " -------------------------------------------------------------------------- - GRUB BIOS Bootloader Install & Check -------------------------------------------------------------------------- -" + +echo "Setting up boot" if [[ ! -d "/sys/firmware/efi" ]]; then grub-install --boot-directory=/mnt/boot ${DISK} else diff --git a/scripts/1-setup.sh b/scripts/1-setup.sh index 9a8848e..551f651 100755 --- a/scripts/1-setup.sh +++ b/scripts/1-setup.sh @@ -1,81 +1,56 @@ #!/usr/bin/env bash -echo -ne " - - Automated Arch Linux Installer - SCRIPTHOME: archcrystal - -" +echo -ne "Setting up archcrystal" source $HOME/archcrystal/setup.conf -echo -ne " - -Network Setup -" -pacman -S --noconfirm --needed networkmanager dhclient -systemctl enable NetworkManager -echo -ne " +echo "Setting up Network" +pacman -S --noconfirm --needed networkmanager dhclient ntp +systemctl enable --now NetworkManager +systemctl enable --now dhclient +systemctl enable --now ntpd -Setting up Pacman mirrors for optimal download +echo "Setting up Pacman" +pacman -Sy archlinux-keyring -" -pacman -S --noconfirm --needed pacman-contrib curl -pacman -S --noconfirm --needed reflector rsync grub arch-install-scripts git +pacman -S --noconfirm --needed pacman-contrib curl reflector rsync grub arch-install-scripts git cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak +sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf +sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf +pacman -Sy --noconfirm --needed +sed -i '35 i ILoveCandy' /etc/pacman.conf +sed -i 's/#Color/Color/' /etc/pacman.conf +systemctl enable paccache.timer +systemctl enable trim.timer +echo "Setting up compression settings" nc=$(grep -c ^processor /proc/cpuinfo) -echo -ne " - -You have " $nc" cores. And -changing the makeflags for "$nc" cores. -Aswell as changing the compression settings. - -" TOTAL_MEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') if [[ $TOTAL_MEM -gt 8000000 ]]; then sed -i "s/#MAKEFLAGS=\"-j2\"/MAKEFLAGS=\"-j$nc\"/g" /etc/makepkg.conf sed -i "s/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T $nc -z -)/g" /etc/makepkg.conf fi -echo -ne " - -Setup Language and set locale -" +echo "Setup Language, locale and keymap" sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen locale-gen timedatectl --no-ask-password set-timezone ${TIMEZONE} timedatectl --no-ask-password set-ntp 1 -localectl --no-ask-password set-locale LANG="en_US.UTF-8" LC_TIME="en_US.UTF-8" -ln -s /usr/share/zoneinfo/${TIMEZONE} /etc/localtime -# Set keymaps -localectl --no-ask-password set-keymap ${KEYMAP} +sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen +locale-gen +echo "LANG=en_US.UTF-8" >/etc/locale.conf +echo "LC_TIME=en_US.UTF-8" >>/etc/locale.conf +ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime +echo "KEYMAP=${KEYMAP}" >/etc/vconsole.conf # Add sudo no password rights sed -i 's/^# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers sed -i 's/^# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers -#Add parallel downloading -sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf - -#Enable multilib -sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf -pacman -Sy --noconfirm --needed - -# Enable ILoveCandy -sed -i '35 i ILoveCandy' /etc/pacman.conf -sed -i 's/#Color/Color/' /etc/pacman.conf +echo -ne "Pacstrapping Base System" +pacman -S --noconfirm --needed mesa ibus man-db vim echo -ne " - -Installing Base System - -" - -sudo pacman -S --noconfirm --needed mesa xorg ibus man-db vim wifi-menu dialog -echo -ne " - Installing Microcode - " # determine processor type and install microcode proc_type=$(lscpu) @@ -110,16 +85,6 @@ elif grep -E "Intel Corporation UHD" <<<${gpu_type}; then libva-intel-driver libvdpau-va-gl lib32-vulkan-intel vulkan-intel libva-intel-driver libva-utils lib32-mesa fi -echo -ne " - -Installing Audio Drivers - -" -pacman -S --noconfirm --needed \ - alsa-utils alsa-plugins pulseaudio pulseaudio-alsa pulseaudio-bluetooth \ - bluez bluez-utils -systemctl enable bluetooth - #SETUP IS WRONG THIS IS RUN if ! source $HOME/archcrystal/setup.conf; then # Loop through user input until the user gives a valid username @@ -156,9 +121,7 @@ if ! source $HOME/archcrystal/setup.conf; then echo "NAME_OF_MACHINE=${name_of_machine,,}" >>${HOME}/archcrystal/setup.conf fi echo -ne " - Adding User - " if [ $(whoami) = "root" ]; then groupadd libvirt @@ -178,9 +141,8 @@ if [ $(whoami) = "root" ]; then else echo "You are already a user proceed with aur installs" fi -echo -ne " +echo -ne " SYSTEM READY FOR 2-user.sh - " read -p "Press enter to continue" diff --git a/scripts/2-user.sh b/scripts/2-user.sh index 0081b44..289cdf8 100755 --- a/scripts/2-user.sh +++ b/scripts/2-user.sh @@ -1,18 +1,11 @@ #!/usr/bin/env bash -#github-action genshdoc -# -# @file User -# @brief User customizations and AUR package installation. source $HOME/archcrystal/setup.conf export PATH=$PATH:~/.local/bin if ! command -v yay &>/dev/null; then - echo -ne " -Installing AUR Helper -" - cd ~ && git clone "https://aur.archlinux.org/yay.git" && cd ~/yay && makepkg -si --noconfirm - cd ~ + echo "Installing AUR Helper" + cd ~ && git clone "https://aur.archlinux.org/yay.git" && cd ~/yay && makepkg -si --noconfirm && cd ~ else echo "yay is already installed" fi @@ -23,6 +16,7 @@ installPackages() { local toInstallPacman="" local toInstallYay="" + echo "Packages to install" for key in "${!packages[@]}"; do local packageManager=${key%%:*} local package=${key#*:} @@ -34,10 +28,7 @@ installPackages() { fi done - # clears pacman cache - read -p "Press enter to continue" - if [ -n "$toInstallPacman" ]; then sudo pacman -S --noconfirm $toInstallPacman fi @@ -48,77 +39,30 @@ installPackages() { yay -Sc --noconfirm } -declare -A pkgsToInstall=( - # Essentials - ["pacman:git"]="versioning" - ["pacman:python-pip"]="The PyPA recommended tool for installing Python packages" - ["pacman:python-psutil"]="Required by a lot of packages" - ["pacman:vim"]="Vim" +echo "Installing essentials" +declare -A essentials=( + # Basic dependencies + ["yay:mkinitcpio-firmware"]="Firmware and drivers for initramfs" ["pacman:libsecret"]="Allow apps use gnome-keyring" - ["pacman:ufw"]="DAEMON Firewall" - ["pacman:pacman-contrib"]="Contributed scripts and tools for pacman systems" + ["pacman:xsel"]="Clipboard manager" - # Environment - ["pacman:nodejs"]="Node.js" + # Terminal ["pacman:rxvt-unicode"]="terminal emulator" + ["pacman:urxvt-perls"]="Perl extensions for urxvt" ["pacman:zsh"]="shell" - ["yay:nvm"]="Node version manager" - # Monitoring + # Monitor ["pacman:acpid"]="DAEMON to dispatch ACPI events" ["pacman:htop"]="CLI process administrator" - ["pacman:ncdu"]="disk usage cli" - ["pacman:neofetch"]="i use arch btw" ["pacman:thermald"]="DAEMON to prevent cpu overheating" + ["pacman:ufw"]="DAEMON Firewall" + ["pacman:neofetch"]="CLI System information tool" - # Network - ["pacman:ntp"]="Network Time Protocol" - ["pacman:bluez-utils"]="Utilities such as bluetoothctl" - - # Compatibility - ["pacman:dosfstools"]="DOS filesystem utilities" - ["pacman:ifuse"]="A fuse filesystem to access the contents of iOS devices" - ["pacman:libimobiledevice"]="A cross-platform librariesand tools for iOS" - ["pacman:ntfs-3g"]="NTFS filesystem driver and utilities (windows compat)" - ["pacman:os-prober"]="For detecting other operative system such as Windows" - ["pacman:cups"]="Printers compat" - - # Fonts - ["pacman:adobe-source-han-sans-otc-fonts"]="Adobe fonts for CN, KR, JP compat" - ["pacman:ttf-font-awesome"]="Dependency for powerline" - ["yay:powerline-fonts-git"]="Fonts for the powerline statusline plugin" - ["yay:ttf-font-icons"]="A set of icons and symbols for TTF fonts" - ["yay:ttf-roboto-mono"]="Monospaced font family for user interface and coding environments" - - # Desktop environment - ["pacman:dunst"]="DAEMON Notification server " - ["pacman:rofi"]="App launcher" - ["pacman:i3"]="Tiling manager" - ["pacman:i3status"]="i3 dependency (bar)" - ["pacman:xdg-user-dirs"]="Setup default dirs" - - # Desktop Application (Prioritizing GNOME apps) - ["pacman:arandr"]="GNOME Screen layout manager" - ["pacman:autorandr"]="Autorefresh screen layouts" - ["pacman:gnome-keyring"]="GNOME Keyring for psw management" - ["pacman:gparted"]="GNOME Disk manager" - ["pacman:nautilus"]="GNOME File explorer" - ["pacman:pavucontrol"]="GNOME Volume Control" - ["pacman:polkit-gnome"]="GNOME auth agent (dependency for gui apps)" - ["pacman:seahorse"]="GNOME application for managing PGP keys" - ["yay:lightscreen"]="GNOME Screenshots app" - - # Apps & Utilities - ["pacman:chromium"]="A web browser built for speed, simplicity, and security" - ["pacman:discord"]="All-in-one voice and text chat" - ["pacman:p7zip"]="Compression tool" - ["pacman:powerline"]="Statusline plugin for vim" - ["pacman:tree"]="Show directory structures in cli" - - # Developer environment - + # Graphic server + ["pacman:xorg-xinit"]="Xinit" + ["pacman:xorg"]="Xorg" ) -installPackages pkgsToInstall +installPackages essentials echo "Setting up ZSH as default shell" chsh -s /bin/zsh @@ -127,41 +71,88 @@ RUNZSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/ echo "Enabling services" sudo systemctl enable acpid -sudo systemctl enable bluetooth -sudo systemctl enable cups -sudo systemctl enable NetworkManager -sudo systemctl enable ntpd sudo systemctl enable thermald sudo systemctl enable ufw -sudo systemctl enable paccache.timer -sudo systemctl enable trim.timer +sudo ufw enable -echo "Setting up ZSH as default shell" -chsh -s /bin/zsh -echo "Installing oh-my-zsh" -RUNZSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +echo "Installing audio drivers" +declare -A drivers=( + # Audio + ["pacman:pipewire"]="Audio server" + ["pacman:pipewire-audio"]="Audio server" + ["pacman:pipewire-docs"]="Pipewire documentation" + ["pacman:wireplumber"]="Pipewire session manager" + ["pacman:pipewire-alsa"]="Pipewire alsa" + # Bluetooth + ["pacman:bluez"]="Bluetooth stack" + ["pacman:bluez-utils"]="Bluetooth stack" + # Printer + ["pacman:cups"]="Printer" +) +installPackages drivers -echo "Setting up user directories" -xdg-user-dirs-update +echo "Enabling drivers" +sudo systemctl enable cups +sudo systemctl enable bluetooth -echo "Setting up NVM" -mkdir -p ~/.nvm -echo "export NVM_DIR=\"$HOME/.nvm\"" >>$HOME/.zshrc -echo "[ -s \"$NVM_DIR/nvm.sh\" ] && \. \"$NVM_DIR/nvm.sh\" # This loads nvm" >>$HOME/.zshrc -echo "[ -s \"$NVM_DIR/bash_completion\" ] && \. \"$NVM_DIR/bash_completion\" # This loads nvm bash_completion" >>$HOME/.zshrc +echo "Installing desktop apps" +declare -A desktopApps=( + # wm + ["pacman:i3"]="Tiling manager" + ["pacman:i3status"]="i3 bar" -echo "Setting up git" -git config --global user.email "$GIT_EMAIL" -git config --global user.name "$GIT_NAME" + # Ricing + ["pacman:dunst"]="DAEMON Notification server" + ["pacman:feh"]="Image viewer and wallpaper setter" + ["pacman:picom"]="Compositor" + ["pacman:rofi"]="App launcher" -echo "Setting up firewall" -sudo ufw default deny -sudo ufw enable + # apps + ["pacman:autorandr"]="Autorefresh screen layouts" + ["pacman:chromium"]="A web browser built for speed, simplicity, and security" + ["pacman:discord"]="All-in-one voice and text chat" + ["pacman:ncdu"]="disk usage cli" + ["pacman:p7zip"]="Compression tool" + ["pacman:powerline"]="Statusline plugin for vim" + ["pacman:redshift"]="Image viewer" + ["pacman:tree"]="Show directory structures in cli" + ["pacman:xdg-user-dirs"]="Setup default dirs" -echo -ne " -------------------------------------------------------------------------- - SYSTEM READY FOR 3-post-setup.sh -------------------------------------------------------------------------- -" + # gnome env + ["pacman:arandr"]="GNOME Screen layout manager" + ["pacman:gnome-keyring"]="GNOME Keyring for psw management" + ["pacman:gnome-screenshot"]="GNOME Screenshots app" + ["pacman:gparted"]="GNOME Disk manager" + ["pacman:nautilus"]="GNOME File explorer" + ["pacman:pavucontrol"]="GNOME Volume Control" + ["pacman:polkit-gnome"]="GNOME auth agent (dependency for gui apps)" + ["pacman:seahorse"]="GNOME application for managing PGP keys" + ["pacman:seahorse-nautilus"]="GNOME application for managing PGP keys" +) +installPackages desktopApps +xdg-user-dirs-update + +echo "Installing fonts" +declare -A fonts=( + ["pacman:adobe-source-han-sans-otc-fonts"]="Adobe fonts for CN, KR, JP compat" + ["pacman:ttf-fira-code"]="Base font" + ["pacman:ttf-font-awesome"]="Dependency for powerline" + ["yay:powerline-fonts-git"]="Fonts for the powerline statusline plugin" + ["yay:ttf-font-icons"]="A set of icons and symbols for TTF fonts" + ["yay:ttf-ionics"]="A set of icons and symbols for TTF fonts" + ["yay:ttf-roboto-mono"]="Monospaced font family for user interface and coding environments" +) +installPackages fonts + +# declare -A dev=( +# ["pacman:docker"]="Container runtime" +# ["pacman:docker-compose"]="Container runtime" +# ["pacman:go"]="Go" +# ["yay:nvm"]="Node version manager" +# ["pacman:python-pip"]="The PyPA recommended tool for installing Python packages" +# ["pacman:python-psutil"]="Required by a lot of packages" +# ) + +echo "SYSTEM READY FOR 3-post-setup.sh" read -p "Press enter to continue" exit diff --git a/scripts/3-post-setup.sh b/scripts/3-post-setup.sh index c3f621f..be4c785 100755 --- a/scripts/3-post-setup.sh +++ b/scripts/3-post-setup.sh @@ -1,31 +1,15 @@ #!/usr/bin/env bash -echo -ne " - -Final Setup and -SConfigurations -GRUB EFI Bootloader Install & Check - -" +echo "GRUB EFI Bootloader Install & Check" source ${HOME}/archcrystal/setup.conf if [[ -d "/sys/firmware/efi" ]]; then grub-install --efi-directory=/boot ${DISK} fi -echo -ne " - -Creating (and Theming) Grub Boot Menu - -" echo -e "Updating grub..." grub-mkconfig -o /boot/grub/grub.cfg -echo -e "All set!" - -echo -ne " - -Cleaning -" # Remove no password sudo rights sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers @@ -33,5 +17,4 @@ sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: A sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers -# Replace in the same state cd $pwd