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.

  • deikoepfiges_dreirad@lemmy.zip
    link
    fedilink
    arrow-up
    1
    ·
    7 months ago

    I used to like the idea of nixos because it felt “tidy” to configure everything centrally. However that tidyness is achieved by adding an extra layer which just replicates the configuration options of every program. If there is a bug in that layer or something is just not implemented, either you have to learn the whole inernals of nixos and nixpkgs, for which there is no real documentation, or you have to resort to doing things imperatively again, which is hard because of the opacity of the generated system and also defeats the whole purpose. So basically, you are completely dependent on nixos developers for things you could have easily done yourself on arch.

    • flashgnash@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      7 months ago

      I have to disagree with this, with home-manager you can pretty much put just put your normal config files inside your NixOS config and map them into wherever they’re meant to go, except now they’re managed by nix

      The built in config options are really nice but you don’t have to use them in the slightest as long as the package itsself is in nixpkgs

  • dino@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    You didn’t mention a single argument for why you would need a reproducible system. It sounds more like the buzz around immutable systems makes you think you are losing out on something, which is not the truth.

  • hottari@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    7 months ago

    You can setup your Arch with grub menu btrfs snapshots just like NixOS for convenient rollbacks. NixOS has too steep a learning curve, coming from someone who recently tried it and ended up being somewhat disappointed by it. NixOS sounds good on paper but in reality it is a long way from a mature product for desktop or general use.

    As you mentioned Arch has AUR which packages just about anything and everything you could ever want in the future. And the Arch Wiki will never be “not relevant” so long as you are using Linux anywhere, the Arch Wiki is a handy reference.

  • Unmapped@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    7 months ago

    The downside of NixOS is bad documentation. Which makes it take quite a while to get your config setup the way you want. Its so worth it though. I used arch for 5+ years and have been on NixOS for about 6 weeks now. I’m definitely never going back. My conifg is done, I barely have to change anything now. Its all saved in a git repo so I never have to make it again. I’ve already switched all of my machines over. And even a few of my friends. Which has been super easy to do cause I just give them my config then remove everything they don’t need. I’ve only been using it for a little while but it feels so reliable and Unbreakable even though I’m running unstable packages. Because if anything breaks you just go back to the last generation that worked. Which made me willing to just try anything when I was setting it up.

    Also you could run Nix package manager on arch for this, but the nix package repo is amazing. It has everything i’ve needed or even thought about installing. And in my opinion its way better than using AUR packages. Most of the time you just DL them and don’t have to build them. Its just so much faster and more reliable then using Paru or Yay. Plus there is a NUR( nix user repo) but tbh I’ve never even looked at it.

    The other con I know of is issues running binaries and app images. But there are was work arounds for them. I use a few app-images by just running ‘appimage-run <appimage filename>’. And so far its worked perfectly. As for a binaries you can use steam-run or I think using distrobox would work. But I haven’t had to do anything like that yet.

    I found this YouTube channel quite useful when I was setting mine up. Vimjoyer

    • AggressivelyPassive@feddit.de
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      I found it fairly difficult to set up nixos on one of my machines, because it simply didn’t ship with a certain, relatively common kernel module/user space app. I also couldn’t find a usable workaround (only compiling my own kernel on every update, which is not exactly my kind of fun).

      So, you might want to try that out first.

      • noli@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        https://nixos.wiki/wiki/Linux_kernel

        You can specify custom parts of the config that enables that module and/or extra module packages.

        If you specify a custom part of the config then ye sure you’ll be compiling the kernel on each kernel update but you don’t need to manually configure it

  • Guenther_Amanita@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    7 months ago

    Neither of both.

    Both are more on the tinkerer-side, and for university you need something reliable and easy to use in my eyes.

    And that might be Fedora Silverblue/ Atomic (or universal-blue.org to be more precise for QOL-tweaks).
    It is definitely more simple, stable (release cycle) and also more reliable, since there’s only one base (Fedora packages + your DE), and therefore less configuration variability.

    I’d also lose access to the AUR

    No, you wouldn’t. Neither on Nix, nor on Fedora Atomic. Especially on Silverblue you layer and containerise a lot, and you can always use the pre-installed and self updating Distrobox to install Arch and use the AUR. That’s also what I do, and it works fine, even though I almost never feel the urge to use it.

    • lily33@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      Actually, both Arch and NixOS are pretty reliable, and won’t just break out of nowhere, leaving your computer unusable.

      • penquin@lemm.ee
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        It’s kinda sad that Arch has this “unstable” reputation, while it is very solid distro. I’ve been running it on my laptop for a long time and I honestly don’t even remember the last time it broke. Thing literally just works.

      • hglman@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        arrow-down
        1
        ·
        7 months ago

        Sure, but when you need to add something new, it will be a lot of effort.

  • Helix 🧬@feddit.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

    If you want to make your OS to a hobby, choose NixOS.

    If you want a system that just works, use Kinoite or Debian.

    If you want cutting edge software but fear Arch/Endeavour is prone to breakage, consider doing file system snapshots e.g. with snapper which you can boot into.

  • Astaroth@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    7 months 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
      1
      ·
      edit-2
      7 months 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
        1
        ·
        edit-2
        7 months 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

  • taanegl@beehaw.org
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    edit-2
    7 months ago

    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.