Skip to content
Rangeldev73Public

About

Reproducible Arch Linux + Hyprland setup for a Lenovo LOQ: GNU Stow dotfiles, bootstrap script, LUKS2 + Btrfs/Snapper, NVIDIA PRIME and GitHub Dark theme | Setup reproduzível de Arch Linux + Hyprland para notebook Lenovo LOQ: dotfiles com GNU Stow, script de instalação, LUKS2 + Btrfs/Snapper, NVIDIA PRIME e tema GitHub Dark

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

dotfiles

🇧🇷 Português

My Arch Linux + Hyprland setup for a Lenovo LOQ 15IRX9 laptop (Intel i5-13450HX + RTX 4050), kept reproducible: every config file lives here as a GNU Stow package, and one bootstrap script turns a fresh Arch install into this exact system: packages, dotfiles, system files and services. Tested first in a VirtualBox VM, then installed on the real hardware.

Each decision behind it (disk layout, encryption, GPU, power, theme) is written down with its reason in bootstrap/notes/, so the machine can be rebuilt, or understood, without guessing.

Desktop with Waybar and wallpaper

Showcase dashboard (Super+D): fastfetch, clock, btop, cmatrix and cava

Highlights

  • Reproducible bootstrap. bootstrap/install.sh installs the package lists, builds yay for the AUR, links every Stow package, copies system files into / and enables services. It is idempotent, has a --dry-run mode, detects the machine profile from the hostname (loq or vm), and moves any existing config that would block a link into ~/.dotfiles-backup/<timestamp>/ instead of overwriting it.
  • Encrypted, snapshot-protected disk. LUKS2 + Btrfs with separate subvolumes (@, @home, @log, @pkg, @snapshots, @swap, @docker, @containerd), Snapper + snap-pac snapshots on every pacman transaction, and a pacman hook that copies /boot (FAT32, outside Btrfs) into the root subvolume, so each snapshot carries the kernel that matches it.
  • Hibernation to a 20 GiB swapfile on its own subvolume, resumed by systemd (no resume= kernel parameters).
  • Hybrid graphics done deliberately. Hyprland runs only on the Intel iGPU (stable /dev/dri/intel-igpu / nvidia-dgpu names from a udev rule); the RTX 4050 (nvidia-open) is used on demand with prime-run for Godot and Steam/Proton.
  • Battery care. TLP profiles (balanced on AC, low-power on battery) with battery conservation mode; hypridle dims, locks, turns off the screen and suspends only when on battery.
  • Per-machine config. hyprland.lua loads machines/<hostname>.lua for monitor scale and GPU selection, with a default.lua fallback.
  • One consistent theme. GitHub Dark (Primer) palette with an ice-cyan accent (#7dcfff) and JetBrains Mono Nerd Font across Hyprland, Waybar, Rofi, kitty, swaync, hyprlock, GTK 3/4, btop, cava and VS Code.
  • No secrets in git. The ssh package holds only ~/.ssh/config; keys and known_hosts are ignored. Chrome, VS Code and Claude Desktop store credentials in gnome-keyring via --password-store=gnome-libsecret.

Stack

Area Choice
Distro / kernel Arch Linux, linux, intel-ucode
Boot systemd-boot, systemd-based initramfs (sd-encrypt, sd-vconsole), autologin on tty1 behind LUKS
Disk LUKS2 (passphrase), Btrfs (zstd:1), Snapper + snap-pac
Compositor Hyprland (Lua config), hyprpaper, hypridle, hyprlock, hyprpolkitagent
Bar / launcher / notifications Waybar, Rofi, swaync
Terminal / shell kitty, bash, Starship
GPU Intel (Mesa, vulkan-intel) + NVIDIA (nvidia-open, nvidia-prime)
Power TLP
Audio PipeWire + WirePlumber
Theme adw-gtk3-dark, Papirus-Dark, Bibata-Modern-Ice, JetBrains Mono Nerd Font
Dev tools JDK 25 + 21, Maven, Docker (socket-activated), C/C++, Python + uv, Node LTS, .NET, Godot (C#)

Repository layout

Every top-level folder except bootstrap/ and assets/ (README screenshots) is a Stow package: its contents mirror $HOME.

hypr/       Hyprland (hyprland.lua, theme.lua, machines/), hyprpaper, hypridle, hyprlock, scripts
waybar/     bar, styles, power menu
rofi/       two-panel app launcher + list theme (clipboard history)
swaync/     notification center
kitty/      terminal, colors, showcase session
gtk/        GTK 3/4 settings and CSS overrides
starship/   prompt
bash/       .bashrc, .bash_profile (starts Hyprland on tty1)
btop/ cava/ fastfetch/   monitor, visualizer, system info (themed)
vscode/     settings.json + Wayland flags
chrome/ claude/          Wayland and keyring flags
ssh/        ~/.ssh/config only

bootstrap/
  install.sh          post-install script
  pkgs-*.txt          package lists: common, dev, aur, loq, vm
  files/              system files for every machine (copied to /)
  files-loq/          LOQ-only system files: mkinitcpio, TLP, udev rules
  notes/              install guide, design decisions, tests, keybinds

Install

The disk, LUKS, bootloader and fstab are manual steps from the live ISO, documented in bootstrap/notes/loq-install.md. After the first boot, from a TTY (not inside Hyprland) and as a normal user:

git clone https://github.com/Rangeldev73/dotfiles.git ~/dotfiles
cd ~/dotfiles
bash bootstrap/install.sh --dry-run   # print every action first
bash bootstrap/install.sh             # profile picked from the hostname, or pass loq | vm

Snapper's initial config is manual too: bootstrap/notes/snapper.md.

To link or relink a single package after editing it (a new file in a package needs this too):

stow --no-folding -R -v -d ~/dotfiles -t ~ hypr

Keybinds

A few essentials (Super = Windows key). Full cheat sheet: bootstrap/notes/keybinds.md.

Keys Action
Super+Q Terminal (kitty)
Super+R App launcher (Rofi)
Super+E File manager (Thunar)
Super+C Close window
Super+L Lock screen
Super+D Showcase dashboard (fastfetch, btop, clock, cmatrix, cava)
Super+Shift+V Clipboard history
Super+1..0 / Super+Shift+1..0 Go to / move window to workspace
Print / Shift+Print Screenshot of an area / the whole screen

Notes worth reading

File What it covers
loq-design.md Disk, encryption, boot and hibernation decisions, and why
loq-install.md Step-by-step install from the live ISO
loq-first-boot-tests.md What was verified after the first boot
loq-hardware.md Hardware facts collected on the live ISO
loq-dev-tools.md Java, Docker, .NET, Godot, Steam setup
loq-visual.md Every theme decision, including app settings not kept in git (IntelliJ, Godot, Chrome)

Known limitations / open items

  • Built for one specific laptop. Other machines get the default.lua fallback, but the files-loq/ system files and pkgs-loq.txt are LOQ-only.
  • The RTX 4050 does not power itself off (RTD3 is not available on this model); for maximum battery life the dGPU is disabled in the BIOS (UMA Graphics).
  • Secure Boot is off and LUKS unlocks with a passphrase only; sbctl and TPM unlock are possible later steps.
  • systemd-boot has no boot-into-snapshot menu: a full rollback is done from the live USB.
  • An external monitor on HDMI (probably wired to the NVIDIA GPU) is not tested yet.
  • The wallpaper is kept outside the repo (~/Pictures/Wallpapers/current symlink).

About

Reproducible Arch Linux + Hyprland setup for a Lenovo LOQ: GNU Stow dotfiles, bootstrap script, LUKS2 + Btrfs/Snapper, NVIDIA PRIME and GitHub Dark theme | Setup reproduzível de Arch Linux + Hyprland para notebook Lenovo LOQ: dotfiles com GNU Stow, script de instalação, LUKS2 + Btrfs/Snapper, NVIDIA PRIME e tema GitHub Dark

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages