aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2022-03-25 22:06:14 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2022-03-25 22:06:14 +0530
commitf7925a5fbbba48b11dbcb398df6c4bde9d870710 (patch)
tree21314884ef50e27920a9042e358c64445769bf9d
parent5221f44344b22b54e6de4c27c0eb893d1106fb44 (diff)
downloadarch-magic-f7925a5fbbba48b11dbcb398df6c4bde9d870710.tar.gz
arch-magic-f7925a5fbbba48b11dbcb398df6c4bde9d870710.tar.bz2
arch-magic-f7925a5fbbba48b11dbcb398df6c4bde9d870710.zip
bash
-rwxr-xr-xarch_install.sh110
-rw-r--r--notes18
2 files changed, 128 insertions, 0 deletions
diff --git a/arch_install.sh b/arch_install.sh
new file mode 100755
index 0000000..04f08c2
--- /dev/null
+++ b/arch_install.sh
@@ -0,0 +1,110 @@
+# == MY ARCH SETUP INSTALLER == #
+#part1
+printf '\033c'
+echo "Welcome to biswa's arch installer script"
+sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf
+pacman --noconfirm -Sy archlinux-keyring
+loadkeys us
+timedatectl set-ntp true
+lsblk
+echo "Enter the drive: "
+read drive
+cfdisk $drive
+echo "Enter the linux partition: "
+read partition
+mkfs.ext4 $partition
+read -p "Did you also create efi partition? [y/n]" answer
+if [[ $answer = y ]] ; then
+ echo "Enter EFI partition: "
+ read efipartition
+ mkfs.vfat -F 32 $efipartition
+fi
+mount $partition /mnt
+pacstrap /mnt base base-devel linux linux-firmware
+genfstab -U /mnt >> /mnt/etc/fstab
+sed '1,/^#part2$/d' `basename $0` > /mnt/arch_install2.sh
+chmod +x /mnt/arch_install2.sh
+arch-chroot /mnt ./arch_install2.sh
+exit
+
+#part2
+printf '\033c'
+pacman -S --noconfirm sed
+sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf
+ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
+hwclock --systohc
+echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
+locale-gen
+echo "LANG=en_US.UTF-8" > /etc/locale.conf
+echo "KEYMAP=us" > /etc/vconsole.conf
+echo "Hostname: "
+read hostname
+echo $hostname > /etc/hostname
+echo "127.0.0.1 localhost" >> /etc/hosts
+echo "::1 localhost" >> /etc/hosts
+echo "127.0.1.1 $hostname.localdomain $hostname" >> /etc/hosts
+mkinitcpio -P
+passwd
+pacman --noconfirm -S grub efibootmgr os-prober
+echo "Enter EFI partition: "
+read efipartition
+mkdir /boot/efi
+mount $efipartition /boot/efi
+grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
+sed -i 's/quiet/pci=noaer/g' /etc/default/grub
+sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=0/g' /etc/default/grub
+grub-mkconfig -o /boot/grub/grub.cfg
+
+pacman -S --noconfirm xorg-server xorg-xinit xorg-xkill xorg-xsetroot xorg-xbacklight xorg-xprop \
+ noto-fonts noto-fonts-emoji noto-fonts-cjk ttf-jetbrains-mono ttf-joypixels ttf-font-awesome \
+ sxiv mpv zathura zathura-pdf-mupdf ffmpeg imagemagick \
+ fzf man-db xwallpaper python-pywal youtube-dl unclutter xclip maim \
+ zip unzip unrar p7zip xdotool papirus-icon-theme brightnessctl \
+ dosfstools ntfs-3g git sxhkd zsh pipewire pipewire-pulse \
+ vim emacs arc-gtk-theme rsync firefox dash \
+ xcompmgr libnotify dunst slock jq aria2 \
+ dhcpcd networkmanager rsync pamixer mpd ncmpcpp \
+ zsh-syntax-highlighting xdg-user-dirs
+
+systemctl enable NetworkManager.service
+rm /bin/sh
+ln -s dash /bin/sh
+echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+echo "Enter Username: "
+read username
+useradd -m -G wheel -s /bin/zsh $username
+passwd $username
+echo "Pre-Installation Finish Reboot now"
+ai3_path=/home/$username/arch_install3.sh
+sed '1,/^#part3$/d' arch_install2.sh > $ai3_path
+chown $username:$username $ai3_path
+chmod +x $ai3_path
+su -c $ai3_path -s /bin/sh $username
+exit
+
+#part3
+printf '\033c'
+cd $HOME
+git clone --separate-git-dir=$HOME/.dotfiles https://github.com/bugswriter/dotfiles.git tmpdotfiles
+rsync --recursive --verbose --exclude '.git' tmpdotfiles/ $HOME/
+rm -r tmpdotfiles
+git clone --depth=1 https://github.com/Bugswriter/dwm.git ~/.local/src/dwm
+sudo make -C ~/.local/src/dwm install
+git clone --depth=1 https://github.com/Bugswriter/st.git ~/.local/src/st
+sudo make -C ~/.local/src/st install
+git clone --depth=1 https://github.com/Bugswriter/dmenu.git ~/.local/src/dmenu
+sudo make -C ~/.local/src/dmenu install
+git clone --depth=1 https://aur.archlinux.org/paru.git ~/.local/src/paru
+cd ~/.local/src/paru
+makepkg -si
+cd
+paru -S libxft-bgra-git
+
+ln -s ~/.config/x11/xinitrc .xinitrc
+ln -s ~/.config/shell/profile .zprofile
+sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
+mv ~/.oh-my-zsh ~/.config/zsh/oh-my-zsh
+rm ~/.zshrc ~/.zsh_history
+alias dots='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
+dots config --local status.showUntrackedFiles no
+exit
diff --git a/notes b/notes
new file mode 100644
index 0000000..92e13f2
--- /dev/null
+++ b/notes
@@ -0,0 +1,18 @@
+1 - asking for drive
+2 - asking for linux partition
+3 - proceed anyway ext4
+4 - did you create efi partition
+5 - efi partition name
+6 - hostname
+7 - new root password
+8 - retype root password
+9 - again efi partition name
+10 - enter username
+11 - new user password
+12 - retype user password
+13 - baph install yes confirmation
+14 - libxft remove
+15 - again y for baph
+16 - y for brave
+17 - Y for ohmyzsh default shell
+18 - password of user for default shell change