From a3df861e967c4f0862251106dfe219a590eefe95 Mon Sep 17 00:00:00 2001 From: krolyxon Date: Wed, 1 Jun 2022 22:43:37 +0530 Subject: [PATCH] first commit --- README.md | 1 + arch_install.sh | 117 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 README.md create mode 100644 arch_install.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..1f63da5 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# arch-install \ No newline at end of file diff --git a/arch_install.sh b/arch_install.sh new file mode 100644 index 0000000..8d5e7d6 --- /dev/null +++ b/arch_install.sh @@ -0,0 +1,117 @@ +# == MY ARCH SETUP INSTALLER == # +#part1 +printf '\033c' +sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf +pacman --noconfirm -Sy archlinux-keyring +loadkeys us +timedatectl set-ntp true +lsblk +printf "\e[0;34mEnter the drive: \e[0m" +read drive +cfdisk $drive +printf "\e[0;34mEnter the EFI partition: \e[0m" +read efipartition +mkfs.fat -F32 $efipartition +read -p "Did you also create swap partition? [y/n]" answer +if [[ $answer = y ]] ; then + printf "\e[0;34mEnter swap partition: \e[0m" + read swappartition + mkswap $swappartition + swapon $swappartition +fi +printf "\e[0;34mEnter the linux filesystem partition: \e[0m" +read partition +mkfs.ext4 $partition +echo "mounting $partition to /mnt" +mount $partition /mnt +pacstrap /mnt base base-devel linux linux-firmware +genfstab -U /mnt >> /mnt/etc/fstab +sed '1,/^#part2/d' arch_install.sh > /mnt/arch_install2.sh +chmod +x /mnt/arch_install2.sh +arch-chroot /mnt ./arch_install2.sh +exit + +#part2 +printf '\033c' +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 +printf "\e[0;34mHostname: \e[0m" +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 +printf "\e[0;34mEnter EFI partition: \e[0m" +read efipartition +mkdir /boot/efi +mount $efipartition /boot/efi +grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=archlinux --recheck +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-xprop xorg-xkill xorg-xsetroot xorg-xinit xmodmap \ + noto-fonts noto-fonts-emoji noto-fonts-cjk ttf-jetbrains-mono ttf-joypixels ttf-font-awesome \ + awesome-terminal-fonts cmake dunst exa btop ntfs-3g \ + jq mpv ncdu maim obs-studio transmission-cli yt-dlp cowsay \ + pacman-contrib pavucontrol rsync ueberzug ranger python-pywal \ + sfml sxiv xdotool xwallpaper zip unzip wget pcmanfm \ + fzf man-db pipewire pipewire-pulse xcompmgr firefox pamixer \ + xclip sxhkd imagemagick networkmanager git dash arc-gtk-theme papirus-icon-theme \ + neovim lua lua-language-server lldb rust-analyzer rustup xdg-user-dirs + zsh zsh-autosuggestions zsh-syntax-highlighting +systemctl enable NetworkManager.service +rm /bin/sh +ln -s dash /bin/sh +# echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +echo "%wheel ALL=(ALL:ALL) ALL" >> /etc/sudoers +printf "\e[0;34mEnter Username: \e[0m" +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/krolyxon/dotfiles.git tmpdotfiles +rsync --recursive --verbose --exclude '.git' tmpdotfiles/ $HOME/ +rm -r tmpdotfiles +git clone --depth=1 https://github.com/krolyxon/dwm.git ~/.local/src/dwm +sudo make -C ~/.local/src/dwm install +git clone --depth=1 https://github.com/krolyxon/st.git ~/.local/src/st +sudo make -C ~/.local/src/st install +git clone --depth=1 https://github.com/krolyxon/dmenu.git ~/.local/src/dmenu +sudo make -C ~/.local/src/dmenu install +git clone --depth=1 https://github.com/krolyxon/slstatus.git ~/.local/src/slstatus +sudo make -C ~/.local/src/slstatus install +git clone --depth=1 https://github.com/krolyxon/nvim.git ~/.config/nvim +git clone https://aur.archlinux.org/paru-bin.git && cd paru-bin && makepkg -si && cd .. && rm -rf paru-bin +paru -S --noconfirm nerd-fonts-hack +paru -S libxft-bgra +chsh -s $(which zsh) +printf "bro do you want to install that fucking nvidia-390xx drivers? (y-N): " +read driver +if [[ $driver == y ]]; then + paru -S --noconfirm nvidia-390xx + fi + +ln -s ~/.config/x11/xinitrc .xinitrc +ln -s ~/.config/shell/profile .zprofile +alias dots='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' +dots config --local status.showUntrackedFiles no +exit