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.

  • velox_vulnus
    link
    fedilink
    20
    edit-2
    7 months ago

    Using NixOS for more than six months, and I think I’m eligible to say what I like and hate about it.

    What you’ll like:

    • easy configuration - just refer https://search.nixos.org, it’s that easy. I’m not taking that comment about “NixOS being hard to configure” seriously - and this is coming from someone who hasn’t even learnt the language properly. Yes, my configuration.nix is slightly polluted with Starship configs, and I might want to break them into modules, but it is still a job done decently.
    • won’t break easily except in some extreme situations - Laptop accidentally slipped from my hand during nixos-rebuild switch --upgrade - I guess it was the physical trauma to my device messed up the mount path to /boot, but it was rescued by a single CLI command from the recovery USB, and I didn’t lose any files.
    • upgrade is not prone to breakage, and even if it does, you can rollback - just don’t walk while holding your device and drop it.
    • it is a serious distro, not a “hobby” OS, and the experiences you will gain from learning Nix will help you with SaaS platforms like Replit or Railway, if you’re interested in using them sometimes in the future.

    What you won’t like:

    • Binaries do not work properly - since Nix store is a completely different storage system compared to your usual FHS, most of the binaries will suffer from incorrect RPATH and dynamic loader issues - you might have to autopatchELF them, which is kind of irritating. This is also the case for AppImages, by the way.

    • Nix language is more like a custom DSL and less of a general purpose language, so you’re gonna have to use another language for automation (Shell, Python, Ruby), which might pollute your self-hosted Nixpkgs - Guix fixes this issue.

    • The bad part about NixOS is writing Nixpkgs expressions. The repository is damn huge and it is hard to maintain spaghetti code, writing your own package can be pretty hard, there’s some “hack”-y stuff you’re gonna have to use for building in, let’s say, using buildRustPackage and buildDotnetModule, and you’re gonna have to work with a senior maintainer.

    Honestly, if I had to avoid Nix, I would go for Guix, Gentoo or Devuan. But yes, if you’re a beginner, I’d ask that you refrain from touching NixOS.

    • @tetris11@lemmy.ml
      link
      fedilink
      77 months ago

      Guix

      +1, since for me it’s much easier to grok the language and the schema at a single glance.

      Plus for those worrying about linux-libre kernel not having the right drivers for your hardware, non-guix has you covered and you can easily switch to linux-mainline. I’m really enjoying Guix a lot right now.

      • AggressivelyPassive
        link
        fedilink
        27 months ago

        Nix would need some proper GUI for that. It’s very “shove into cold water”, which isn’t exactly the best experience.

        • velox_vulnus
          link
          fedilink
          17 months ago

          You might want to look into SnowFlake OS, which is supposed to be an easier NixOS.