- Arch linux
- Nvim
- Alacritty
- Zsh
- Bspwm
-
Install arch linux ISO from [http://mirror.pmf.kg.ac.rs/archlinux/iso/2021.06.01/]. By the time you are watching this, there will be new versions. Choose the newest.
-
Make ISO bootable and plug it in. For this step you are free to use any method you want.
-
Open bios on start laptop ( usually F2, with plugged bootable USB ).
-
Disable secure boot in bios.
-
Change usb boot order ( select your USB device and move it to the top of boot order )
-
By this time you should get prompted with your Arch Linux installer which is just the terminal
-
Let's get that wifi rolling!.
iwctldevice list station ${device name} scan station ${device name} get-networks station ${device name} connect ${SSID} ( Enter passphrase ) exitVerify wifi connection once you are connected:
ping google.com ( Confirm net ) -
Setup the time
timedatectl set-ntp trueVerift the time:
timedatectl status -
Next up we have to do the partitioning. Find Hard Disk you wish to install linux on.
fdisk -lSelect Hard Disk you wish to install linux on.
fdisk /dev/${Hardisk/SSD name}This will lead us to fdisk environment. We have to create a partition table with 3 partitions. Bootable, swap and filesystem once. Filesystem is the one most important for us, because our Linux is actually gonna live on that partition.
Let' create partition table.
gCreate boot partition. You will get prompted to fill parition number and size.
nPartition number
1Partition size+550MCreate swap partition ( Good practice to have it double the size of RAM )
nPartition number
2Partition size+30GCreate filesystem partition
nPartition number
3Partition size will be the rest of remaining memory. Just hitEnterNext we have to change type of boot partition.
t11Next let's change swap
t219Last filesystem partition is already correct type becauase it is selected by default.
Write out our partition table
w -
Out first boot partition is going to be FAT type
mkfs.fat -F32 /dev/{ Device name partition 1 } -
Adding swap parition
mkswap /dev/{ Device name partition 2 } -
Turning the swap on
swapon /dev/{ Device name partition 2 } -
Filesystem partition is gonna be EXT4
mkfs.ext4 /dev/{ Device name partition 3 } -
Then we mount our filesystem partition to
/mntpathmount /dev/{ Device name partition 3 } /mnt -
Now we need install linux on our
/mntpath. To initilize our linux instalation on our partition that is mountpacstrap /mnt base linux linux-firmware -
Genfstab our
/mntgenfstab -U /mnt >> /mnt/etc/fstab -
Finally let's enter our
/mntas arch installation.arch-chroot /mnt -
Find your zone. It should be close to your location at least.
ls /usr/share/zoneinfo -
Then we set it up simply by:
ln -sf /usr/share/zoneinfo/Europe/Belgrade /etc/localtime -
Let's check is our clock is correct.
hwclock --systohc -
Install all of the required packages with pacman ( some might be missing from the list.
pacman -S neovim sudo grub efibootmgr dosfstools os-prober mtools networkmanager base-devel git xorg xorg-xinit picom nitrogen discord nemo flameshot alacritty bspwm sxhkd rustup alsa-utils pulseaudio pavucontrol bc rofi wmctrl xdotool ripgrep wget noto-fonts neofetch net-tools docker docker-compose redshift xclip xdo ntfs-3g acpid firefox -
Install zshrc
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -
Copy
.zshrcfrom repo to$HOME/.zshrcfor ZSH Shell.nvim **$HOME**/.zshrc && source **$HOME**/.zshrcInstall:
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10kand
git clone https://github.com/agkozak/zsh-z $ZSH_CUSTOM/plugins/zsh-zand
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlightingand
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestionsand
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && ~/.fzf/installTo have the same configuration, you can also copy
.p10k.zshfrom repo into your$HOME/.p10k.zsh -
Now we uncomment
en-USlanguage so our Linux system displays all the text in that language.vim /etc/locale.gen ( uncomment line 177 )Then we reload:
locale-gen -
Set the hostname.
vim /etc/hostnameThen simply write wanted hostname. I recomment "arch".
-
Set the hosts
vim /etc/hosts127.0.0.1 localhost ::1 localhost 127.0.1.1 ${hostname}.localdomain ${hostname} -
Set the root password
passwd -
Add a user that you will use, since using root is not practical.
useradd -m ${username}Then we set the password for our new user
passwd {username}We also give him different permissions. Most important is wheel. Then we can assume root role essentially by running sudo.
usermod -aG wheel,audio,video,optical,storage,input,docker {username}But we all want to uncomment wheel all alll line so wheel group acts as godlike group.
EDITOR=nvim visudoAs said, we uncomment wheel all all line, so wheel is any role.
-
Create boot entry for first partition. Then install grub, so our system knows where to boot from.
mkdir /boot/EFImount /dev/{ First boot partition } /boot/EFIgrub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheckgrub-mkconfig -o /boot/grub/grub.cfg -
Enable NetowkrManager, so we can have access to wifi next time we log in.
systemctl enable NetworkManager.service -
Let's install yay helper, so we can easily install other dependencies not included in official pacman repo.
git clone https://aur.archlinux.org/yay-git.git && cd yay-git && makepkg -si && cd .. && rm -rf yay-gitThen we install:yay -S polybar libinput-gestures spotify postman-bin betterlockscreen ttf-jetbrains-mono-nerd ttf-fira-code-nerd ttf-hack-nerd noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extraWe will also install nvm to manage our node versions.git clone http://github.com/creationix/nvm.git .nvmsource $HOME/.nvm/nvm.sh -
Install npm global packages
npm install -g typescript typescript-language-server diagnostic-languageserver jest mocha pyright svelte-language-server prettier npm eslint_d -
Configure sound with
alsa-mixer -
We have to configure out touchpad as well. We take shared default one and put in
/etccp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/40-libinput.confThen add to touchpad section:
Option "NaturalScrolling" "true" Option "Tapping" "true" -
To run startx on login take .zlogin file from repo and put it in
$HOME/.zloginvim $HOME/.zlogin -
To suspend on lid switch change
/etc/systemd/logind.confand uncommentHandleLidSwitch=suspend -
To configure neofetch take neofetch folder from repo and put it in
$HOME/.config -
To autologin edit:
sudo vim /usr/lib/systemd/system/[email protected]Then
ExecStart=-/sbin/agetty -a USERNAME %I $TERMThen
ln -sf /usr/lib/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/[email protected] -
Copy
bspwmfolder. Put it in$HOME/.config. -
Copy
sxhkdfolder. Put it in$HOME/.config. -
Copy
polybarfolder. Put it in$HOME/.config. -
Copy
picomfolder. Put it in$HOME/.config. -
Copy
alacrittyfolder. Put it in$HOME/.config. -
Copy
.xinitrcfile. Put it in$HOME. -
Finally we unmount and that's it:
umount -I /mnt
```
All that is left is to <code>reboot</code> and enjoy.
```