›INDEX
Last Updated:

Switching to NixOS and Wayland

As summer began and university concluded, I found myself with a week free of responsibilities. It seemed like the perfect opportunity to dive into NixOS and Wayland. After watching numerous videos and reading various reviews, I felt compelled to explore these technologies further.

If you want a quick summary on whether you should switch to NixOS then the summary section can be quick read.

Motivations and Background

My primary inspirations for trying NixOS came from influential videos by No Boilerplate, Chris Titus Tech, and Vimjoyer. The motivation for Wayland and Hyprland (the tiling window manager for Wayland) was various different reports of Wayland being better than Xorg as a display server.

I had been using ArcoLinux (an Arch Linux derivative) with Xorg and i3 as my tiling window manager, primarily for the availability of packages, efficiency, and customizability. Customization is crucial for me—I have numerous scripts and keybindings that allow me to control my system entirely with my keyboard, streamlining everything from configuring displays to launching frequently used applications.

Why NixOS?

NixOS offered several enticing features:

  • Stability: Rollback to a previous configuration if something goes wrong.
  • Replicability: System configurations can be replicated with a single file.
  • Dependency Management: No dependency conflicts; multiple versions of packages can coexist.
  • Efficiency: Shared dependencies are not duplicated, saving space.
  • Extensive Packages: More packages than Arch Linux's AUR.
  • Seamless Migration: Easily reproduce the system on another machine.
  • Perfect Rollback: Revert changes effortlessly.
  • Versatile Releases: Choose between stable or rolling releases, or both.
  • Automatic Upgrades: Upgrade in the background without worry.

While switching to an entirely new system was daunting, I was excited to take on the challenge.

Configuration

I spent three days immersing myself in learning and configuring NixOS. The documentation, while comprehensive, wasn't always user-friendly, so I relied heavily on YouTube tutorials, particularly from Vimjoyer and LibrePhoenix. LibrePhoenix’s videos were instrumental in helping me grasp the system's intricacies. NixOS, similar to Vim has a high learning curve! It's going to take a while before you understand how to do things on your own.

After much effort, I managed to configure NixOS to a usable state. Understanding the fundamentals made it preferable to traditional methods. NixOS’s configuration allows you to track changes easily, especially when using flakes, making it simple to revert to previous states if needed.

Some valuable resources I used:

  • MyNixOS: Useful for looking up application and system configuration details.
  • NixOS Manual: Comprehensive information about NixOS.
  • NixOS Wiki: Helpful for setting up different applications and configurations.

You can view my final configuration here.

Results

I was delighted with my NixOS, Wayland, and Hyprland setup! The ability to switch seamlessly between Xorg with i3 and Wayland with Hyprland was invaluable. The feature to roll back to previous versions of the system and hot-reload configurations proved incredibly useful.

However, I encountered significant challenges that necessitated a return to Arch Linux. Many software applications are not developed with Linux as a primary target, often only supporting Ubuntu or other mainstream distributions. NixOS deviates from many standard Linux conventions (e.g., lacking /bin/bash or /usr/bin/bash), causing compatibility issues with software like PIA VPN, my university's VPN, and the XP-Pen tablet driver. These applications used a regular bash script to install software rather than creating a packaged Linux application. These tools are essential for me, and their incompatibility with NixOS was a dealbreaker.

This issue underscores a broader challenge: software providers not only need to support Linux but also ensure compatibility with NixOS, which can be an additional burden which they may not be willing to take on.

Things I Miss

Having moved back to ArcoLinux, I miss several aspects of NixOS, particularly the ease of configuring Wayland. On Arch, I struggled to resolve various minor issues associated with Wayland and Hyprland.

NixOS's approach to managing files and configurations made me realize how cumbersome traditional systems can be. Keeping track of numerous files for fonts, environment variables, and other settings felt tedious after experiencing NixOS’s streamlined process.

I also miss having the ability to have both stable and unstable packages on my system maintained by NixOS - I want bleeding edge software but I also want stability. This was something that was possible with NixOS and is not with regular Arch Linux.

NixOS truly feels like the developers perfect operating system, where everything is highly configurable and easily replicable.

If NixOS gains more popularity or I find solutions for the software compatibility issues, I will eagerly switch back and continue from where I left off. I really want to be using NixOS but I'm unable to do so due to my software requirement limitations! I think I'll play around with NixOS on a virtual machine and if I'm able to solve my problems, I'll switch back to it eventually.

Summary: Should You Use NixOS?

NixOS is a powerful and innovative operating system that offers significant benefits:

  • Rock-solid stability: The ability to roll back to previous configurations ensures you can recover from any issues effortlessly.
  • Reproducibility: Configurations are stored in a single file, making it easy to replicate your setup across multiple machines.
  • Superior dependency management: Avoid dependency conflicts and save space with efficient package management.
  • Extensive package availability: Access a broader range of packages compared to Arch Linux's AUR.
  • Flexibility: Choose between stable and rolling releases to suit your needs.
  • Automatic, worry-free upgrades: Keep your system up-to-date seamlessly.

However, NixOS is not without its challenges:

  • Compatibility issues: Some software may not work out of the box due to NixOS’s unique system structure.
  • Steep learning curve: Initial setup and configuration can be time-consuming and require a thorough understanding of the system.
  • Not Beginner Friendly: NixOS is not something I would recommend to someone that is new to Linux - the documentation isn't good enough and configuration requires a lot of initial effort. You'll not only have to learn Linux but also NixOS.

If you value stability, reproducibility, and efficient package management, and are willing to invest time in learning and configuring a new system, NixOS can be an excellent choice. However, if you rely heavily on software that may not be fully compatible with NixOS’s unconventional setup, you might encounter significant hurdles. Be ready to spend a significant amount of time trying to make unique software work with NixOS.

Enjoy the notes on this website? Consider supporting me in this adventure in you preferred way: Support me.