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.

  • Astaroth@lemm.ee
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    1 year ago

    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.

    • hallettj@beehaw.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 year ago

      I want to make a small correction - this is not true:

      iirc I had to reboot every time for it to be applied while with Arch you can just install something and run it immediately.

      nixos-rebuild behaves like most package managers: it makes new packages available immediately, and restarts relevant systemd services. Like other distros you have to reboot to run a new kernel.

      And cleaning up Steam games is as issue with most distros too. But I kinda see your point.

      Btw Nix (both NixOS and the Nix package manager running in other distros) has this feature where you can run packages without “installing” them if you just want to run them once:

      $ nix shell nixpkgs#package-name
      

      That puts you in a shell with one or more packages temporarily installed. The packages are downloaded to /nix/store/ as usual, but will get garbage-collected sometime after you close the shell.

      • Astaroth@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 year ago

        Thank you for the correction. It was 2 years ago + I was really inexperienced so I could be misremembering things and/or just have been doing things incorrectly