Skip Navigation

Arch or NixOS?

I've been here a week ago already asking if Arch would be fine for a laptop used for university, as stability is a notable factor in that and I'm already using EndeavourOS at home, but now I'm curious about something else too - what about Arch vs NixOS?

I heard that NixOS is pretty solid, as due to the one file for your entire system format you can both copy and restore your system easily whenever, apart from your normal files and application configurations of course.

Are there any major downsides to NixOS compared to Arch apart from the Arch Wiki being a bit less relevant? I'd also lose access to the AUR, but admittedly I don't think I've ever actually needed it for anything, it's just nice to have. Also, since NixOS has both rolling release and static release and you can mix and match if you wanna get packages from unstable or not, I'm not losing Arch's bleeding edge, which is nice.

76 comments
  • Let me put it like this: it's about learning curve. Arch is relatively easy to begin with, but NixOS gets much easier the more nix you learn.

    What do I mean about that? Imagine having to patch something, which can be the thing. On arch you'd have to replace a package, which could lead to issues and conflicts, whereas NixOS gives you the option to keep two or even more versions of the same library, because it does not rely on your traditional UNIX path.

    But with this super power comes a catch. You have to learn a programming language and learn how the nix store operates, which is a pretty high learning curve. Also, NixOS suffers from a governance issue and going by the documentation is like shooting in the dark.

    That being said, the best manual for NixOS is GitHub, searching for anything and filtering by the nix language. You'll see a ton of varying systems, be they workstations or servers.

    And no matter what all the warnings say, no, flakes aren't EXPERIMENTAL or UNSTABLE, but rather CONTENTIOUS internally. Again: I love NixOS, but they gotta fix their governance issues.

  • As a recent NixOS convert coming from Bazzite (Kinoite/Silverblue with user friendly daily driver and gaming tweaks), and before that mostly Arch-based distros, I'd say it boils down to the tradeoff between having way more control over reproducibility and having to deep dive into the often poorly documented domain specific rabbit hole that is Nix. If you're comfortable with going out of your way to learn, looking for examples, reading source code to find out what options you can use or how stuff works, it can absolutely be worth it but it's a steep price to pay for sure.

    I personally adore what Nix sets out to solve and find it extremely rewarding to learn. Plus, as a developer, I enjoy puzzling out how to get stuff done and don't mind diving into the source if I need to, so it works for me. I'd absolutely prefer solid documentation, of course, but it's not a deal breaker.

    When it comes to software, the Nix repo has a staggering amount of prebuilt binaries ready to download (which you can search here) and it's often not too hard to hack together your own reproducible package if you want after you get comfortable enough with it. At least for my use cases, I haven't really missed much from my days using Arch and the AUR. If anything, I appreciate how much more consistent it tends to be in comparison.

    If you, like myself, go for a flake (yet another rabbit hole within a rabbit hole) based setup and point to the unstable repo, you basically get a fully reproducible, easy to update and rollback rolling release not too dissimilar to using Arch with auto btrfs snapshots enabled. That's how I used to do Arch and it feels pretty familiar.

    Anyway, that's what I got. If you have any more specific concerns or questions I'd be happy to elaborate!

    Edit: I forgot to add but I find a nice way to get comfortable without fully commiting is using Nix as a package manager on any old distro. You could install it on Endeavour (I recommend this method) and play around with Home Manager, use it as a dotfiles manager on steroids, have it declaratively install and manage the CLI apps you can't live without and whatnot, see how you like it. That's how I started, I have a common HM config I've so far used with Debian at work, Ubuntu running under WSL when I'm on Windows and now NixOS itself.

  • Once I found out about Paru, I decided I would no longer need another OS outside of everything Arch provides. Also, Valve decided to switch SteamOS to Arch, so I'm sticking with it once they release it.

  • some comments.

    • both are absolutely fine for a university laptop, though very different.
    • NixOS is more stable. It is almost impossible to brick it, you would have to delete every working old generation.
    • nixpkgs is like arch repos plus AUR together. nixpkgs is actually one of the biggest repos if not the biggest repo at the moment. so no problems there.
    • i mean, this is like highly subjective and my own opinion: go with NixOS, it's just a cooler OS imo and your system and your abilities will only get better with time. and it's fully reproducible by design, so almost every bit of work you put into it will be worth it, in some sense. i also believe that NixOS will become much much more relevant in the future. bigger community, better documentation, more resources!
    • ...unless you don't want to put a lot of time in it in the beginning. it will most likely be really frustrating and it will distract you from other dtuff you want to do on your computer. like just getting browser email editor etc. you will have a setup no problem pretty quickly. it won't be more than just puttung the programs you need in your systempackages. but then you realize you need vpn, or a dropbox client, or some audio setup, and other stuff, and before you know it you are spending hours and hours or weeks trying to find out how this works... this is, i would say, the major "downside" of NixOS conpared to arch
    • if you can afford trying it out and then switching to something else and starting over again, try out NixOS!
  • Disclaimer: I only tried NixOS for less than a month when I was a complete Linux noob, I have since then been daily driving Arch Linux for about 2 years now.


     

    For me, at least on the surface level, NixOS just felt like Arch Linux, with more similarities than differences.

    What was nice about NixOS was the single config file for everything, although iirc I had to reboot every time for it to be applied while with Arch you can just install something and run it immediately.

    Edit: I either remembered it wrong or I was doing it wrong because you don't have to reboot the whole system according to the reply from hallettj.

     

    What I didn't like however was all the packages that got installed (through the list in the config file) had really strange directories which I couldn't find easily.

    like on Arch the packages and the executables are basically all at /usr/lib/ and /usr/bin/ and iirc it was pretty much the same on NixOS, except on Arch I'll have usr/lib/firefox but on nix it would be usr/lib/u123uadqasd782341kasjhiu3sh932s9sdasdsapzxcqw-firefox

     

    Another thing is that it works great for everything you install through the Nix config file, but it's not necessarily going to clean up any files created by programs that got installed through it when you remove the packages from the config file.

    Like say you have installed steam and then you install some game through steam, well that game wasn't added through the config file so there's no guarantee that if you decide to remove steam that you will also remove whatever the programs steam installed or if they created some new files somewhere.

     

    Of course the same thing already happens on other OSes as well, so you could say that it's an upside that Nix is better at cleaning up after itself whenever you remove something, but also because it's supposed to all be controlled through a single config it just feels that much worse when you have to hunt down some file somewhere.


     

    Again these are mostly my anecdotes from 2 years ago when I was a complete noob. Maybe I wouldn't have any issues if I tried it today. And chances are I was just trying to do something you shouldn't even be doing.

    Plus at the start I used KDE Plasma 5 on Nix and Arch, maybe it will go better if I use i3wm on NixOS like I've been doing for a year and half or so on Arch now.

     

    At least I'm pretty sure that having daily driven Arch for 2 years now I would have much better chances with NixOS now than when I tried it with 0 experience on Linux.

    So since you've already got the experience from using EndeavorOS you might not have any big problems using NixOS, or at least learn how it works pretty fast.

  • All Linux distros can be unstable & really it all comes down to how you use your system....

  • Neither, rock solid Debian + flatpak for the latest software.

    • I've already considered Debian, but... I dunno, this isn't what I'd call the most logical reason, but I just kinda don't like it as my desktop OS. I'd use Debian over basically anything else for a server, but as a desktop OS I don't like the vibe.

      Keep in mind, I started using Linux this summer and in a few years I'll probably look back at this wondering why I was such an idiot, but I gotta fall and get a bloody nose first to notice ;3

      • I’ve already considered Debian, but… I dunno, this isn’t what I’d call the most logical reason, but I just kinda don’t like it as my desktop OS. I’d use Debian over basically anything else for a server, but as a desktop OS I don’t like the vibe.

        I was on the same boat as you are, flatpak essentially made it all perfect.

76 comments