Hello and welcome to the post. This one is gonna be a massive doozy, so I'll just get right into it.
Brief Disclaimer
This is going to be a personal and opinionated review of NixOS and my experience with it thus far. I will be going over what it is, why I use it, and why you may (or may not) want to. It will NOT be an explanation as to why I use Linux in general, or what Linux is; another story, another time. This review will be most easily understood by users that have at least dabbled in Linux.
Also, apologizing in advance if this is hard to follow or incoherent, either due to some lacking tech literacy on your end, some lack of writing flow on my end, or a mix of both. I will try to keep things pretty simple but I will not be explaining every single thing I mention because Google is a free site.
With ALL of that out of the way..
So.. What IS a NixOS?
NixOS is distribution of the GNU/Linux Operating System that dates back to 2003. Although it is even older than popular distros like Arch (2004) and Linux Mint (2006) it remains much less popular than them. Through the course of the blog, you may be able to pick up why. It releases twice a year with both stable and unstable package channels (you'll see why this is extra cool in a bit here).
How is it different from other Distros?
With many other Distributions, they use an "Imperative" package manager model. What does this mean?
So in a distribution like Arch Linux, you'd just shove commands into the terminal and they'd be evaluated immediately. For example, to install Discord on Arch, you'd type in something like "sudo pacman -S discord". This certainly works (and no hate to pacman, it's my 2nd favorite package manager behind Nix) but it has a few flaws;
1. It's not super clear with what it's doing. -S in pacman means "sync" and is syncing the package list with whatever new package(s) you added, or in simpler terms, installing any package listed. However, this might've been hard to guess had you not looked it up.
2. It's not made clear where this is all being managed. Again, you can look things up in order to look under the hood and see what's happening but it's a little bit vague.
3. If something screws up (and trust me, it will, eventually), be prepared to wrestle with pacman and systemd to get the packages in order. This especially rings true for more complicated installations like desktop environments.
4. Dependencies are just referenced in other packages. This is one of the most common causes of broken packages. If 2 electron apps need different versions of electron it can be a pain to get them both working.
5. If something SUPER bad happens, hope you had backups, or are fine wrestling with boot-repair, or whatever else.
6. Installing all those packages and services on another computer? Sounds like a hassle..
7. Bleeding Edge? Not my cup of tea. (Or, Alternatively) Stable? I want recent software please.
NixOS attempts to solve ALL of these issues, and even improve on the experience.
1. All of your packages are "declarative." This means that they are clearly declared in a config file and can be edited freely. All I have to do is add packages to that array, and run "nixos-rebuild switch." Just like that, Nix will evaluate the config file and adjust my package list accordingly.
2. This also addresses the 2nd issue. Where are your packages managed? Right here, right now. Just edit the file and run the rebuild command.
3. Want to switch between WMs freely? Just a few lines in the config file changed, just like that.
4. Dependencies are stored per-package. 'Nuff said.
5. NixOS makes automatic backups called Generations after every rebuild run.
6. Feel free to drag-n-drop your config file between NixOS installations. It will be evaluated (for the most part) exactly the same from system to system.
7. You can mix-n-match packages between Nix's stable and unstable channels if you care to. Since dependencies are stored per-package this all works nicely.
Really cool... Right?
The Gripes
You knew this was coming. Of course this OS isn't perfect. Here's a rapid fire of some of the problems with NixOS, varying in severity:
1. Poor integration outside of nixpkgs. Want a package that doesn't exist in nixpkgs? You can try installing it anyway but it won't be declarative.
2. Poor Docs. Coupled with the last issue, if you're running into some niche issue you probably won't find much support for it.
3. Immutability. This is a double edged sword. Nix installs your packages to the nix store in /etc/nix, and locks root FS access. This can lead to some issues if a task needs root FS access. It also means NixOS might have trouble with apps that need FHS compliance. Immutability, for the most part, is a good thing though, so this is definitely a weaker con.
4. Coding. The config file is in the Nix programming language. You won't be writing full-scale programs or something like that but this part will definitely put off some people.
Personal Experience
Like the last section, I'll rattle off some personal experiences, both good and bad.
Switching from KDE to AwesomeWM
This is probably one of the smoothest transitions I've ever done on Linux, especially for a WM/DE. Just a few lines in my config to switch between the two, it's that easy. No leftover files, no useless services, no BS.
Developing In Python
I initially made the wrong decision of trying to use Python and PIP globally. This worked out until I needed PIP packages that weren't available through nixpkgs. I initially tried dabbling into Flakes with poetry2nix however it didn't go as planned. I eventually switched to using a venv (like I should've done) and everything worked great.
Developing In Rust
Because Cargo manages packages per project anyway I figured I'd have 0 issues here. That was until I needed to compile the sqlx-cli program with the OpenSSL dependency. I tried installing it through Nix and it didn't work. The fix was to fire up a nix-shell and run the compilation there. I then learned that sqlx-cli was already packaged by nix so.. whoops :p
Using Wine
Bottles gave me trouble so I went for ol' Wine. No issues so far.
Using Steam
Sometimes games will fail to launch and a restart of Steam is needed. Outside of that, no issues.
Anything of note I didn't mention? Probably means it worked perfectly fine :3
Who should use NixOS?
Beginning Linux Users?
If a terminal doesn't scare you and you don't mind a few small issues here or there.. maybe. It's still a very different take on an OS even for Linux standards and it's not for everyone but it can help you get used to trial and error, a bit of programming, and Linux as a whole without borking and slapping you in the face.
Seasoned Linux Users?
Give it a shot, kindly, please and thank you. Old Laptop, VM, I don't care, just try it. It's a different take on Linux that will still be fun to customize without all the babysitting. Most packages you love will probably be there (Nixpkgs is bigger than the AUR btw) and the experience will be very smooth.
Developers?
Not forcing your hand or anything but.. highly recommended. I haven't delved into them too much myself but nix-shell and flakes are great isolated approaches to development environments. This love is visualized in many places; ever seen a shell or flake.nix in a repo? Now you know why.
Casual PC Users?
I separate these guys from beginning Linux users; I think of them as casual users looking to browse the web, use an Office Suite, and maybe do some gaming. To those I say.. probably not. Just go for Linux Mint.
Conclusion
Thanks for reading. I've been wanting to make this one for awhile and this marks 2 months of me daily driving the OS. I really do love it and hope that this silly little snowflake can find its way into some of your PCs.
No Linux Distributions were harmed in the making of this blog.
Glossary
WM - Window Manager, Program that manages windowed apps on your PC.
FHS - Filesystem Hierarchy Standard. A Filesystem structuring standard.
Wine - A compatibility layer for running Windows apps in Linux.
Rust - A systems programming language, focusing on speed and memory safety.
Python - A high-level scripting language for general-purpose use.
Cargo - Rust's package manager.
Repo - Repository, A digital set a files and folders where resources are accessed, often source code.
Comments
Displaying 3 of 3 comments ( View all | Add Comment )
◩ ✴⭐ ⃘✧ bauhausdog ✧ ⃘⭐ ✴ ◪
thanks i finally know what the fuss of nix is all about
Report Comment
Okami
Looks interesting :3 I tried it on a vm a week ago might use it when I switch back to Linux, in between it, Linux Mint or Debian
Report Comment
[tomohaze]
always interesting to see a linux distro trying to do something differently~
i can call myself only an amateur linux user and i never really used any non-debian based distro or other close relative *nix much in my time (tho i did suffer on freebsd for quite a while once)
currently tryna make debian 9 befriend my XP computer, and seeming to do well~
Report Comment
Debian is a really solid choice :3 I daily drove it for awhile before giving nix a go, I still like it. Its stability is near unmatched, bar apt screwing up sometimes but thats pretty rare
by Rainy; ; Report