My impressions of nixOS
So the past week has been interesting, to say the least...
I got tired of ubuntu/popOS's BS and decided it was time to try something new, and instead of going with the mainstream power user options such as Arch, Debian, or even Gentoo, I went with something a little more obscure...
NixOS! I've been using it full-time for a week and a half now and I have some thoughts to share with you
For those unaware, NixOS is a system based on the nix declarative package manager, declarative here means that you declare what packages you want to install (and how the system should behave in the case of nixOS) in a configuration file that you can build
The good
The installer is fantastic, first of all, you get a desktop environment in the ISO which means you can follow a tutorial while you're installing on the same machine, unlike arch for example where I have to always pull up my phone to look up how to partition the drive, which is very annoying.
When installing the system you can choose to either use a graphical installer, common on distros such as Ubuntu, or go the hard way and install the system by running commands (or rather editing files) in your terminal
if you choose the command line route then nixOS provides a handy nixos-generate-config
that generates a base configuration for you to edit, it makes things so much easier, it has things like sound.enable = true
already in there for you toy around with. almost everything you do to install nixOS (except partitioning the drives) is done in the 2 generated .nix
files
You can switch between stable and unstable packages WITHOUT reinstalling, so I never felt stuck on either one, this is maybe the best feature of nixOS aside from the declarative stuff. I'd like to also note that nix's package repository, nixpkgs
, is one of the biggest out there with just over 80k packages, which was very surprising to me considering how uncommon it is in the Linux community
nixOS has many options for doing things other than installing packages, for example, I was able to get my ThinkPad's TrackPoint working without too much hassle by adding 3 config options in the configuration.nix
file and rebuilding my config using nixos-rebuild
:
{
hardware.trackpoint.enable = true;
hardware.trackpoint.emulateWheel = true;
}
maybe the most commonly mentioned pro about nixOS is its reproducibility, since everything is done in a few configuration files, it's easy to deploy a copy of the system on another machine, and while I do not have multiple machines to benefit from this, It's nice to be able to backup an entire system's configuration on GitHub
I also found the ability to rollback to a previous version of the config to be pretty nice, you can even do it from the GRUB menu if you broke your system completely, I never needed to use it but it's still nice to have
and finally, there is the nix-shell -p
which creates a shell with the specified programs installed, this shell is separate from the rest system so you can install different versions of packages you already have, once you quit the shell the programs are removed from the system, and you won't believe how useful it is until you try out nixOS
The bad
While some of the problems I encountered may be easily solved, and others not being problems at all, I still include them nonetheless because I want to share what a first-time NixOS user might go through on their first day.
I don't like the language, some people say it's like JSON with functions, but I disagree, usually with tools such as vim and emacs that have their own language. it's pretty easy to grasp the language just by looking at someone else's config, but that's not the case with nix, even after watching a ton of tutorials I still don't feel like I grasp the basics of the language, I think that's due to it being a functional language and I am not very familiar with this type of languages as are most other people
Most of the documentation references nix-env
, a tool that all nixOS users recommend against using due to its slowness and the problems that it causes, yet the devs haven't removed it from the documentation.
there is no good way to search for packages from the terminal: there is a website but most people prefer to use the terminal and unfortunately a tool to search from the terminal doesn't exist as of right now unless you're willing to enable experimental features
compiling random programs from the internet is a no-no as the file system structure on nixOS is wildly different from other distros, if the program doesn't exist in the nixpkgs, then I hate to break it to you but you'll need to package the program yourself, which is pretty hard if you're not too familiar with the nix language like me
Conclusion
Will I continue using nixOS? well let's say my answer is "maybe", the advantages are amazing but I have a lot going on these days. so I may go back to a more traditional, so maybe I'll come back to it in the summer when I have plenty of time, in any case, I'll keep using the nix package manager as it's available on most Linux distros as a standalone thing
if you've enjoyed this article,consider buying me a coffee. currently I am saving up for a better microphone!
Likes & Reposts

Replies

I have used NixOS for week too and I like it but some things feels complicated. For example I wanted to copy ~/.config/monitors.xml file to gdm config dir to enable scaling but it's not possible because the file gets removed after reboot so I found a config option which works but I had to copy the contents of the file in there and it creates the file. Would be a lot simpler to just copy the file instead of making my config unnecessary large. It can be hard to find a solution when you run into issues. For example I can't get Remmina to connect to my work rdp and I haven't managed to find a solutiopn by googling. I can connect from other distros tho. So I gave up trying to fix it and boot into Windows instead when I need to connect to rdp. I feel NixOS documentation is also lacking, it can be confusing and not well explained like Arch wiki. Config options are not always well explained either. But overall I like the distro.

I'm pretty much in the same boat. I switched to NixOS recently, just to get a first hand experience, but I feel like I'm not using any of its benefits yet. So far, I love: single source of truth for configuration having a git-history for my system configuration stable automatic update mechanism cutting edge packages I'm currently learning ad-hoc, when problems arise: root-partition runs out of space? -> guess I'll have to look for mechanism to optimize and clean nix-store package broke after last update? -> guess I'll have to figure out how to install an old version I want to switch from fish to zsh? -> guess I'll have to figure out how to manage oh-my-zsh-packages with nix My currently unsolved issue is: my super old printer worked under arch linux with an AUR package, but I cannot get it to run under NixOS I guess, in about half a year, I will decide if I stay with NixOS or switch to another distro again.

@cbleslie it's sooo slow I didn't mention it.

@spacebuffer> there is no good way to search for packages from the terminal: there is a website but most people prefer to use the terminal and unfortunately a tool to search from the terminal doesn't exist as of right now unless you're willing to enable experimental featuresQuestion: Is `nix-env -qaP` not good enough for you?
@spacebuffer I love the idea of it, but the docs is just to scattered and i, like you, can't feel at home in the language.