Skip to content
vamola.devv2.4 · online

Arch Linux Setup and Minimalist Wayland Environment with Hyprland

Last Updated: 2026-11-25·Reading Time: 5 min·Linux / Wayland
Tiled windows on a dark desktop: a terminal with colourful commands, a browser and a performance graph.

This technical guide documents the steps to set up a zero-latency, hardware-accelerated developer workstation on Arch Linux with Btrfs subvolumes, the Wayland protocol, and the Hyprland dynamic tiling window manager.

Prerequisites

Requirements & Notes

UEFI boot mode with live USB environment and active internet connection required. NVIDIA users should prefer the nvidia-open-dkms driver package.


1. Disk Partitioning & Btrfs Configuration

System stability and instant backup capability through Btrfs root formatting with subvolume layout:

Warning: data loss

The commands in this section format the disk and erase everything on it. Before you continue, check with lsblk that you picked the right disk, and back up anything important. Device names such as /dev/nvme0n1p2 are examples; your disk may be different.

The disk has two partitions: /boot for the bootloader and a Btrfs root. Inside Btrfs the @, @home, @snapshots, @var_log and @var_cache subvolumes are mounted at their own mount points.
The target layout: two partitions, five Btrfs subvolumes.
Terminal (bash)
# Create an EFI partition (p1, about 1 GiB) and a root partition (p2),
# for example with cfdisk, then format them:
mkfs.fat -F32 /dev/nvme0n1p1

# Btrfs subvolumes (@, @home, @snapshots, @var_log, @var_cache)
mkfs.btrfs -L ARCH /dev/nvme0n1p2
mount /dev/nvme0n1p2 /mnt
btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@home
btrfs subvolume create /mnt/@snapshots
btrfs subvolume create /mnt/@var_log
btrfs subvolume create /mnt/@var_cache

Mount subvolumes with appropriate options:

Terminal (bash)
umount /mnt
mount -o noatime,compress=zstd:3,space_cache=v2,subvol=@ /dev/nvme0n1p2 /mnt
mkdir -p /mnt/{home,.snapshots,var/log,var/cache,boot}
mount -o noatime,compress=zstd:3,space_cache=v2,subvol=@home /dev/nvme0n1p2 /mnt/home
mount -o noatime,compress=zstd:3,space_cache=v2,subvol=@snapshots /dev/nvme0n1p2 /mnt/.snapshots
mount -o noatime,compress=zstd:3,space_cache=v2,subvol=@var_log /dev/nvme0n1p2 /mnt/var/log
mount -o noatime,compress=zstd:3,space_cache=v2,subvol=@var_cache /dev/nvme0n1p2 /mnt/var/cache
mount /dev/nvme0n1p1 /mnt/boot

2. Base Installation & Configuration

Terminal (bash)
# Install the base system.
# Use intel-ucode instead of amd-ucode on an Intel CPU.
pacstrap -K /mnt base linux linux-firmware base-devel btrfs-progs snapper snap-pac networkmanager amd-ucode sudo vim git

# Generate fstab
genfstab -U /mnt >> /mnt/etc/fstab

# Chroot into the new system
arch-chroot /mnt

# Timezone & localization
ln -sf /usr/share/zoneinfo/Europe/Istanbul /etc/localtime
hwclock --systohc
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "tr_TR.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "KEYMAP=trq" > /etc/vconsole.conf
echo "myhost" > /etc/hostname

# Root password, a normal user and networking
passwd
useradd -m -G wheel -s /bin/bash youruser
passwd youruser
EDITOR=vim visudo        # uncomment the "%wheel ALL=(ALL:ALL) ALL" line
systemctl enable NetworkManager

The default HOOKS line that Arch ships in /etc/mkinitcpio.conf is already right for a single-disk Btrfs root, so you do not need to change it. It includes the microcode hook, which puts the CPU microcode into the initramfs. Do not add the encrypt hook unless you use LUKS.

Terminal (bash)
mkinitcpio -P

3. Bootloader (systemd-boot)

UEFI starts the bootloader, systemd-boot loads the Linux kernel, the system boots from the Btrfs root subvolume and a Hyprland session starts.
The boot sequence, with the parts you set up in this section.

The microcode is already inside the initramfs (the microcode hook), so the boot entry has no separate initrd /amd-ucode.img line.

Terminal (bash), inside the chroot
bootctl install

cat > /boot/loader/loader.conf <<EOF
default arch.conf
timeout 3
console-mode keep
editor no
EOF

ROOT_UUID=$(blkid -s UUID -o value /dev/nvme0n1p2)
cat > /boot/loader/entries/arch.conf <<EOF
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=UUID=$ROOT_UUID rootflags=subvol=@ rw quiet loglevel=3
EOF

Now leave the chroot (exit), run umount -R /mnt and reboot into the new system.


4. Hyprland & Wayland Ecosystem

Everything below is in the official repositories, so plain pacman is enough. Run it as your normal user with sudo.

Terminal (bash)
sudo pacman -S hyprland waybar rofi swaync kitty wl-clipboard grim slurp wf-recorder hyprpicker hyprlock hypridle polkit-kde-agent qt5-wayland qt6-wayland xdg-desktop-portal-hyprland xdg-desktop-portal-gtk pipewire pipewire-pulse wireplumber brightnessctl playerctl pavucontrol thunar thunar-archive-plugin tumbler btop fastfetch neovim ttf-jetbrains-mono-nerd noto-fonts-emoji

Only a few extras come from the AUR, for example wlogout. To use the AUR you need an AUR helper such as yay:

Terminal (bash)
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin && makepkg -si

yay -S wlogout

5. Hyprland Configuration

Lua config (checked on Hyprland 0.57.2)

Recent Hyprland releases, including 0.57.2, read a Lua file, ~/.config/hypr/hyprland.lua. The old hyprland.conf syntax with windowrulev2 and new_is_master no longer works there. The config below passes Hyprland --verify-config on 0.57.2. If you are on an older release, use the matching page of the Hyprland wiki.

~/.config/hypr/hyprland.lua
local terminal    = "kitty"
local fileManager = "thunar"
local menu        = "rofi -show drun"

-- Default: every monitor at its preferred mode.
-- For a fixed mode, e.g.: hl.monitor({ output = "DP-1", mode = "2560x1440@165", position = "0x0", scale = 1 })
hl.monitor({ output = "", mode = "preferred", position = "auto", scale = "auto" })

hl.config({
  general = {
      gaps_in     = 4,
      gaps_out    = 8,
      border_size = 1,
      col = {
          active_border   = "rgb(38bdf8)",
          inactive_border = "rgb(27272a)",
      },
      layout = "dwindle",
  },
  dwindle = { preserve_split = true },
  master  = { new_status = "master" },
  input = {
      kb_layout    = "us",
      follow_mouse = 1,
      sensitivity  = 0,
      accel_profile = "flat",
  },
})

hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" })

hl.window_rule({ name = "float-pavucontrol", match = { class = "^(pavucontrol)$" }, float = true })
hl.window_rule({ name = "float-nm-editor",   match = { class = "^(nm-connection-editor)$" }, float = true })
hl.window_rule({ name = "float-blueman",     match = { class = "^(blueman-manager)$" }, float = true })

local mainMod = "SUPER"

hl.bind(mainMod .. " + Q", hl.dsp.exec_cmd(terminal))
hl.bind(mainMod .. " + C", hl.dsp.window.close())
hl.bind(mainMod .. " + M", hl.dsp.exit())
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))
hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
hl.bind(mainMod .. " + R", hl.dsp.exec_cmd(menu))
hl.bind(mainMod .. " + P", hl.dsp.window.pseudo())
hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit"))

hl.bind(mainMod .. " + left",  hl.dsp.focus({ direction = "left" }))
hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" }))
hl.bind(mainMod .. " + up",    hl.dsp.focus({ direction = "up" }))
hl.bind(mainMod .. " + down",  hl.dsp.focus({ direction = "down" }))

for i = 1, 5 do
  hl.bind(mainMod .. " + " .. i,           hl.dsp.focus({ workspace = i }))
  hl.bind(mainMod .. " + SHIFT + " .. i,   hl.dsp.window.move({ workspace = i }))
end

hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(),   { mouse = true })
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })

hl.bind("Print", hl.dsp.exec_cmd([[grim -g "$(slurp)" - | wl-copy]]))

hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true })
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"),      { locked = true, repeating = true })
hl.bind("XF86AudioMute",        hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"),     { locked = true })
hl.bind("XF86MonBrightnessUp",  hl.dsp.exec_cmd("brightnessctl set 5%+"), { locked = true, repeating = true })
hl.bind("XF86MonBrightnessDown",hl.dsp.exec_cmd("brightnessctl set 5%-"), { locked = true, repeating = true })

hl.on("hyprland.start", function()
  hl.exec_cmd("waybar")
  hl.exec_cmd("swaync")
end)
hl.bind("SUPER + M", hl.dsp.exit())

Check any change before you log out: Hyprland --verify-config -c ~/.config/hypr/hyprland.lua.


6. Waybar Configuration

~/.config/waybar/config.jsonc
{
"layer": "top",
"position": "top",
"height": 32,
"spacing": 4,
"modules-left": ["hyprland/workspaces"],
"modules-center": ["hyprland/window"],
"modules-right": ["pulseaudio", "network", "cpu", "memory", "clock", "tray"],

"hyprland/workspaces": {
  "disable-scroll": true,
  "all-outputs": true,
  "format": "{name}"
},

"hyprland/window": {
  "format": "{}",
  "max-length": 50
},

"clock": {
  "format": "{:%a %d %b  %H:%M}",
  "format-alt": "{:%Y-%m-%d}",
  "tooltip-format": "<tt><small>{calendar}</small></tt>"
},

"cpu": {
  "format": "CPU {usage}%",
  "tooltip": false
},

"memory": {
  "format": "RAM {percentage}%",
  "tooltip": false
},

"network": {
  "format": "{ifname}: {ipaddr}",
  "format-wifi": "{essid} ({signalStrength}%)",
  "format-ethernet": "Wired: {ipaddr}",
  "format-disconnected": "Offline",
  "tooltip": false
},

"pulseaudio": {
  "format": "VOL {volume}%",
  "format-muted": "Muted",
  "on-click": "pavucontrol",
  "tooltip": false
},

"tray": {
  "icon-size": 16,
  "spacing": 8
}
}

7. Kitty Terminal Configuration

~/.config/kitty/kitty.conf
font_family      JetBrains Mono
bold_font        auto
italic_font      auto
bold_italic_font auto
font_size        11.0

background       #09090b
foreground       #fafafa

cursor           #38bdf8
cursor_text_color #09090b

selection_background #38bdf8
selection_foreground #09090b

color0  #18181b
color8  #3f3f46
color1  #f87171
color9  #ef4444
color2  #4ade80
color10 #22c55e
color3  #fbbf24
color11 #f59e0b
color4  #38bdf8
color12 #0ea5e9
color5  #c084fc
color13 #a855f7
color6  #22d3ee
color14 #06b6d4
color7  #e4e4e7
color15 #fafafa

shell_integration no-cursor
enable_audio_bell no
window_padding_width 8
background_opacity 0.95

8. Snapper & Btrfs Snapshots

Do this after the first boot into the installed system, not inside the chroot. We already mounted a @snapshots subvolume at /.snapshots, and snapper create-config wants to create that directory itself. So you unmount ours first, let Snapper create its config, then put ours back:

Terminal (bash)
sudo umount /.snapshots
sudo rmdir /.snapshots
sudo snapper -c root create-config /
sudo btrfs subvolume delete /.snapshots
sudo mkdir /.snapshots
sudo mount -a                  # mounts @snapshots again from /etc/fstab
sudo chmod 750 /.snapshots

# Optional: snapshots of /home
sudo snapper -c home create-config /home

# Keep fewer timeline snapshots than the defaults
sudo snapper -c root set-config TIMELINE_CREATE=yes TIMELINE_LIMIT_HOURLY=5 TIMELINE_LIMIT_DAILY=7 TIMELINE_LIMIT_WEEKLY=4 TIMELINE_LIMIT_MONTHLY=6

sudo systemctl enable --now snapper-timeline.timer snapper-cleanup.timer

snap-pac, which we installed in step 2, takes a before and after snapshot around every pacman transaction. grub-btrfs is not part of this guide, because it only works with GRUB and we use systemd-boot.


9. NVIDIA Configuration

NVIDIA Users Only

You need the DKMS driver and the kernel headers: sudo pacman -S nvidia-open-dkms linux-headers. On a laptop with both an integrated and a NVIDIA GPU, do not set the environment variables below globally, because they make every app use the NVIDIA GPU.

Add nvidia_drm.modeset=1 to the options line of /boot/loader/entries/arch.conf. Recent drivers turn it on by default, so it is harmless if it is already active:

/boot/loader/entries/arch.conf
options root=UUID=<your-root-uuid> rootflags=subvol=@ rw quiet loglevel=3 nvidia_drm.modeset=1

Then add this to ~/.config/hypr/hyprland.lua:

~/.config/hypr/hyprland.lua
hl.env("LIBVA_DRIVER_NAME", "nvidia")
hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia")
hl.env("GBM_BACKEND", "nvidia-drm")
hl.env("NVD_BACKEND", "direct")

CategoryPackages
Terminalkitty, foot, alacritty, wezterm
Clipboardwl-clipboard, cliphist
Screenshotsgrim + slurp, hyprshot, swappy
File Managerthunar, nemo, yazi
Editorneovim, helix, zed
Searchfzf, ripgrep, fd
Systembtop, fastfetch, procs
Fontsttf-jetbrains-mono-nerd, noto-fonts-emoji

All of these are in the official repositories.


11. Post-Installation Verification

Terminal (bash)
# System information
fastfetch

# Btrfs subvolumes and snapshots
btrfs subvolume list /
sudo snapper -c root list

# Check the Hyprland config
Hyprland --verify-config -c ~/.config/hypr/hyprland.lua

# Start Hyprland from a TTY
start-hyprland

# Inside the session: confirm you are on Wayland
echo $WAYLAND_DISPLAY
echo $XDG_SESSION_TYPE