Update sources:
sudo pacman -Syu
Install yay:
git clone https://aur.archlinux.org/yay-bin.git && cd yay-bin && makepkg -siInstall packages:
sudo pacman -S --noconfirm hyprland xdg-desktop-portal-hyprland zsh kitty nodejs npm dunst pipewire wireplumber polkit polkit-kde-agent socat jq gnome-bluetooth-3.0 bluez bluez-utils dart-sass brightnessctl pacman-contrib cava slurp hyprsunset playerctl cliphist
yay -S rbenv wofi firefox discord ttf-iosevka-nerd noto-fonts-emoji ttf-jetbrains-mono ttf-nerd-fonts-symbols wl-clipboard hyprpicker-git visual-studio-code-bin hyprpaper hyprpolkitagent
Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"Install starship
curl -sS https://starship.rs/install.sh | sh(optional) Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bashIf you do not install the optional packages, edit the .zshrc in this repos /home/.zshrc
Enable services:
sudo systemctl enable systemd-timesyncd.service --now
- Clone this repo:
git clone https://github.com/hrvdm/dots.gitcd dots cp -r Wallpapers ../ cd config && cp -r * ../../.config cd ../home && cp * ../../ - Reboot:
sudo reboot
My Arch install guide
If you have not installed arch before, I recommend following the docs
I assume you already booted into the arch iso environment in UEFI mode.
- Check UEFI mode:
ls /sys/firmware/efi/efivars
- Connect to wifi with
iwctl
iwctldevice liststation {DEVICE} scanstation {DEVICE} get-networksstation {DEVICE} connect {SSID}
Get available disks:
For me it is /dev/sda
lsblk
Setup partitions:
For me it is fdisk /dev/sda:
If you get a warning like "Partition #X contains a vfat signature", press Y - This will overwrite your disk
-
fdisk /dev/{DISK} -
Create empty GPT partition:
g -
Create the EFI partition:
nPartition Number:
PRESS ENTERFirst Sector:
PRESS ENTERLast sector:
+100MtType/Alias:
uefi -
Create the boot partition:
nPartition Number:
PRESS ENTERFirst Sector:
PRESS ENTERLast sector:
+512MtIf prompted, select partition 2
Type/Alias:
linux -
Create the LUKS partition:
nPartition Number:
PRESS ENTERFirst Sector:
PRESS ENTERLast sector:
PRESS ENTERtIf prompted, select partition 3
Type/Alias:
linux -
Check setup:
pThis should print a table, the fields should be something like:
Device Size Type /dev/sda1 100M EFI System /dev/sda2 512M Linux Filesystem /dev/sda3 930.9GB Linux Filesystem -
Write changes to disk:
w -
Format Partitions:
Replace DISK-EFI and DISK-BOOT with your EFI and boot partitions.
For me this is /dev/sda1 and /dev/sda2mkfs.fat -F 32 /dev/{DISK-EFI}mkfs.ext4 /dev/{DISK-BOOT} -
Setup encrypted partition:
Replace DISK-LUKS with your LUKS partition.
For me this is /dev/sda3cryptsetup --use-random luksFormat /dev/{DISK-LUKS}cryptsetup luksOpen /dev/{DISK-LUKS} cryptlvm -
Create LVM volume group:
pvcreate /dev/mapper/cryptlvmvgcreate vg0 /dev/mapper/cryptlvm -
Create LVM partitions:
lvcreate --size 34G vg0 --name swap(RAM Size + 2GB)lvcreate --size 100G vg0 --name rootlvcreate -l +100%FREE vg0 --name home -
Format volumes:
mkswap /dev/vg0/swapmkfs.ext4 /dev/vg0/rootmkfs.ext4 /dev/vg0/home -
Mount filesystem:
Replace DISK-EFI and DISK-BOOT with your EFI and boot partitions.
For me this is /dev/sda1 and /dev/sda2mount /dev/vg0/root /mntmount --mkdir /dev/{DISK-EFI} /mnt/efimount --mkdir /dev/{DISK-BOOT} /mnt/bootmount --mkdir /dev/vg0/home /mnt/homeswapon /dev/vg0/swap
Even if you do not plan to use vim, you need it for visudo. You can change this but it's easier to use vim for first install.
-
Run pacstrap:
pacstrap -K /mnt base linux linux-headers linux-firmware openssh git vim sudo nano networkmanager lvm2 reflector ufw base-devel rustup
genfstab -U /mnt >> /mnt/etc/fstab
If this throws an error, you might have mistyped something.
arch-chroot /mnt /bin/bash
-
Timezone & Locale:
If your not in london, use
ls /usr/share/zoneinfo/to get timezones.ln -s /usr/share/zoneinfo/Europe/London /etc/localtimehwclock --systohccat /etc/locale.gen(You can| grep {REGION}i.e.| grep en_GB)echo "en_GB.UTF-8 UTF-8" > /etc/locale.genlocale-genecho LANG={REGION} > /etc/locale.conf(Replace {REGION} with your's i.e. en_GB.UTF-8) -
Hostname:
echo {YOUR-HOSTNAME} > /etc/hostname -
Create your user:
useradd -m -G wheel --shell /bin/bash {USERNAME}passwd {USERNAME}(If you use special chars, you might want to check their expected keys first)visudo- Enter write mode with
i. - Uncomment
"%wheel ALL=(ALL:ALL) ALL" - Press ESC to open command palette
- Save and exit with
:wthen:qa.
- Enter write mode with
-
Configure mkinitcpio:
nano /etc/mkinitcpio.conf- Add 'encrypt' and 'lvm2' to HOOKS before 'filesystems'
mkinitcpio -P -
Setup grub:
pacman -S grub efibootmgrIf you error here, check your mount points
grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUBnano /etc/default/grub- Add (Change YOUR-LUKS):
GRUB_CMDLINE_LINUX="cryptdevice=/dev/{YOUR-LUKS}:cryptlvm root=/dev/vg0/root"
grub-mkconfig -o /boot/grub/grub.cfg - Add (Change YOUR-LUKS):
-
Enable networkmanager:
systemctl enable NetworkManager -
Exit & Reboot:
exitumount -R /mntswapoff -areboot
We are done!
Reboot to the install USB, unlock cryptlvm and remount, then fix whatever error occured. Usually its a typo or missed step.
cryptsetup luksOpen /dev/{DISK-LUKS} cryptlvm
lsblk
mount /dev/vg0/root /mnt
mount --mkdir /dev/{DISK-EFI} /mnt/efi
mount --mkdir /dev/{DISK-BOOT} /mnt/boot
mount --mkdir /dev/vg0/home /mnt/home
swapon /dev/vg0/swap
Configure via SSH
If you want to SSH to your system after arch is installed:
- Make sure it has an IP
- if not connect it:
nmtui.
- if not connect it:
- Start SSH daemon -
sudo systemctl start sshd - Enable SSH daemon -
sudo systemctl enable sshd - Enable UFW:
sudo ufw enable - Allow SSH in UWF:
sudo ufw allow 22/tcp - Grab your IP:
ip a | grep "inet 192.168."
Remember to disable this post-install
Without ly DM
edit ~/.zlogin and add
# Start window manager
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
exec Hyprland
fiRemember to disable this post-install
Optimisations
Mirror list:
sudo pacman -S reflector
sudo nano /etc/xdg/reflector/reflector.conf
sudo systemctl enable reflector.timer --nowPower for laptops:
sudo pacman -S thermald
yay -S auto-cpufreq
sudo systemctl enable thermald.service --now
sudo systemctl enable auto-cpufreq.service --nowSSD fstrim:
sudo systemctl enable fstrim.timer --now