Krolyxon
Commit 1a2784e

Branches

Refs →

arch-installarch_install.sh

127 lines · 4.4 KB · Bourne Again Shell (bash)

1# == MY ARCH SETUP INSTALLER == #
2#part1
3printf '\033c'
4sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf
5pacman --noconfirm -Sy archlinux-keyring
6loadkeys us
7timedatectl set-ntp true
8lsblk
9printf "\e[0;34mEnter the drive: \e[0m"
10read drive
11cfdisk $drive
12printf "\e[0;34mEnter the EFI partition: \e[0m"
13read efipartition
14mkfs.fat -F32 $efipartition
15read -p "Did you also create swap partition? [y/n]" answer
16if [[ $answer = y ]] ; then
17 printf "\e[0;34mEnter swap partition: \e[0m"
18 read swappartition
19 mkswap $swappartition
20 swapon $swappartition
21fi
22printf "\e[0;34mEnter the linux filesystem partition: \e[0m"
23read partition
24mkfs.ext4 $partition
25echo "mounting $partition to /mnt"
26mount $partition /mnt
27pacstrap /mnt base base-devel linux linux-firmware
28genfstab -U /mnt >> /mnt/etc/fstab
29sed '1,/^#part2/d' arch_install.sh > /mnt/arch_install2.sh
30chmod +x /mnt/arch_install2.sh
31arch-chroot /mnt ./arch_install2.sh
32exit
33
34#part2
35printf '\033c'
36ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
37hwclock --systohc
38echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
39locale-gen
40echo "LANG=en_US.UTF-8" > /etc/locale.conf
41echo "KEYMAP=us" > /etc/vconsole.conf
42printf "\e[0;34mHostname: \e[0m"
43read hostname
44echo $hostname > /etc/hostname
45echo "127.0.0.1 localhost" >> /etc/hosts
46echo "::1 localhost" >> /etc/hosts
47echo "127.0.1.1 $hostname.localdomain $hostname" >> /etc/hosts
48mkinitcpio -P
49passwd
50pacman --noconfirm -S grub efibootmgr os-prober
51printf "\e[0;34mEnter EFI partition: \e[0m"
52read efipartition
53mkdir /boot/efi
54mount $efipartition /boot/efi
55grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=archlinux --recheck
56sed -i 's/quiet/pci=noaer/g' /etc/default/grub
57sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=0/g' /etc/default/grub
58grub-mkconfig -o /boot/grub/grub.cfg
59
60pacman -S --noconfirm xorg-server xorg-xprop xorg-xkill xorg-xsetroot xorg-xinit \
61 noto-fonts noto-fonts-emoji noto-fonts-cjk ttf-jetbrains-mono ttf-font-awesome \
62 awesome-terminal-fonts libnotify dunst ntfs-3g \
63 jq mpv ncdu maim obs-studio transmission-cli yt-dlp cowsay \
64 pacman-contrib pavucontrol rsync ueberzug ffmpegthumbnailer python-pywal \
65 sxiv xdotool xwallpaper zip unzip wget pcmanfm \
66 fzf man-db pipewire pipewire-pulse xcompmgr firefox pamixer \
67 xclip sxhkd imagemagick networkmanager git dash arc-gtk-theme papirus-icon-theme \
68 neovim lua rust-analyzer rustup xdg-user-dirs mpd ncmpcpp \
69 zsh zsh-autosuggestions zathura zathura-pdf-poppler
70
71systemctl enable NetworkManager.service
72rm /bin/sh
73ln -s dash /bin/sh
74# echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
75echo "%wheel ALL=(ALL:ALL) ALL" >> /etc/sudoers
76printf "\e[0;34mEnter Username: \e[0m"
77read username
78useradd -m -G wheel -s /bin/zsh $username
79passwd $username
80echo "Pre-Installation Finish Reboot now"
81ai3_path=/home/$username/arch_install3.sh
82sed '1,/^#part3/d' arch_install2.sh > $ai3_path
83chown $username:$username $ai3_path
84chmod +x $ai3_path
85su -c $ai3_path -s /bin/sh $username
86exit
87
88#part3
89printf '\033c'
90cd $HOME
91git clone --separate-git-dir=$HOME/.dotfiles git@github.com:krolyxon/dotfiles.git tmpdotfiles
92rsync --recursive --verbose --exclude '.git' tmpdotfiles/ $HOME/
93rm -r tmpdotfiles
94# dwm : Window Manager
95git clone --depth=1 git@github.com:krolyxon/dwm.git ~/.local/src/dwm
96sudo make -C ~/.local/src/dwm install
97
98# st: Terminal
99git clone --depth=1 git@github.com:krolyxon/st.git ~/.local/src/st
100sudo make -C ~/.local/src/st install
101
102# dmenu: Program Menu
103git clone --depth=1 git@github.com:krolyxon/dmenu.git ~/.local/src/dmenu
104sudo make -C ~/.local/src/dmenu install
105
106# slstatus: Status bar for dwm
107git clone --depth=1 git@github.com:krolyxon/slstatus.git ~/.local/src/slstatus
108sudo make -C ~/.local/src/slstatus install
109
110# nvim: Text editor
111git clone --depth=1 git@github.com:krolyxon/nvim.git ~/.config/nvim
112
113# paru: AUR helper
114git clone https://aur.archlinux.org/paru-bin.git && cd paru-bin && makepkg -si && cd .. && rm -rf paru-bin
115paru -S --noconfirm htop-vim nerd-fonts-jetbrains-mono lf-bin libxft-bgra zsh-fast-syntax-highlighting-git
116chsh -s $(which zsh)
117printf "bro do you want to install that fucking nvidia-390xx drivers? (y/n): "
118read driver
119if [[ $driver = y ]]; then
120 paru -S --noconfirm nvidia-390xx
121fi
122
123ln -s ~/.config/x11/xinitrc .xinitrc
124ln -s ~/.config/shell/profile .zprofile
125alias dots='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
126dots config --local status.showUntrackedFiles no
127exit