Migrating from i3/X11 to Hyprland on NixOS
Introduction
After years of using a stable X11 + i3 setup (with an NVIDIA GTX 1650 and an ultra-wide monitor), I decided it was time to make the move to Wayland. While my X11 setup “just worked” (apart from some minor screen tearing fixed with ForceFullCompositionPipeline
), it’s clear Wayland is the future, and migration is inevitable for anyone running Linux on modern hardware. When looking at alternatives I tried a couple, Sway, Niri, before settling on Hyprland. I looked around and tried to find more experiences of doing the switch that I was planning, but found limited. Therefore I thought I’d share mine, hopefully helpful for someone else.
Setup
- OS: NixOS (unstable channel, flake-based config)
- GPU: NVIDIA GTX 1650 (proprietary drivers)
- Monitor: Ultra-wide, variable refresh rate supported
- VFIO/GPU passthrough: yes, somewhat involved boot/kernel config
Initial Steps & Installation
The Hyprland wiki was well written and easy to follow. For NixOS, you have the choice between the package or pulling the repo as a Flake. To stay current, I opted to use the flake solution.
A few key points:
- Environment variables and NVIDIA tweaks are essential (see Hyprland FAQ and wiki).
- Use proprietary NVIDIA driver for GTX 1650 and similar, the open version is recommended.
- For VFIO passthrough, ensure kernel modules for NVIDIA are loaded at the right stage (initrd).
- Oddly, you may still need to set the X11 driver to
"nvidia"
in your NixOS config—even if you’re not using X11 anymore.
{
services.xserver.videoDrivers = [ "nvidia" ];
}
Debugging involved journalctl
, dmesg
, and careful reading of nvidia-smi
outputs.
Memory leaks!
So one issue that became evident a while in was issues with VRAM memory. Hyprland was using up all there was, causing graphical glitches, issues with setting windows to fullscreen. Some debugging and I found this issue and solution. Following those instructions it now seems stable.
Final Thoughts
I’ll see where this goes. These are my notes and impressions just a couple of days in. I hope to return to the topic in a while.
August update
I used Hyprland for a couple of months, and the ecosystem. Some plugins were nice. The flash on focus change was in particular nice. I tried with some different tiling methods. Didn’t really find any to my full liking. Qutebrowser kept crashing occasionally. It used quite a lot of VRAM. For many that might not be an issue, but I only have 4GB, and on more than once occasion I had to close windows to free VRAM.
The choice was now between other wayland window managers and going back to i3. I figured I should give Sway another change, and I’m glad I did. I’ve not had any issues what so ever. The fix above regarding memory leaks is still needed. I created a small program that hooks into the sway IPC to create a opacity effect on focus change. Inspired by the one created for Hyprland. For my usage, where I have thin borders and no gaps, it’s sometimes helpful for seeing which is the focused window when switching focus. Feel free to look it up, I’ve precompiled binaries and it’s built using rust so performance implications are minimal. Source

All in all, Hyprland is quite interesting. It has an vast community behind it, of people really interested in improving their workflow and making things look pretty. It still has some quirks and rough edges, and it will be fun to see where it’s at in a while.