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.

  • @Unmapped@lemmy.ml
    link
    fedilink
    18
    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 '. 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
      link
      fedilink
      67 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
        17 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

    • @hottari@lemmy.ml
      link
      fedilink
      47 months ago

      Arch breaks all the time. It has to because upstream is usually always changing so breakage is inevitable.

      Though a person’s mileage on this may vary (less update frequency, less no of programs etc.), the constant thing about rolling release is that breakages within software releases are to be expected.

      • @fxdave@lemmy.ml
        link
        fedilink
        2
        edit-2
        7 months ago

        Ofc, Arch users should learn how to resolve a package conflict, or how to downgrade packages, or generally how to debug the system. Sometimes you also have to migrate config files.

        On the other hand, as an arch user, I can tell that it mostly just works. If you customize heavily an ubuntu, it will break more likely. And while you can fix an arch, you probably have to reinstall an ubuntu.

        Moreover, Arch has a testing repository which is not the default.

      • @LeFantome@programming.dev
        link
        fedilink
        17 months ago

        My experience with Arch is that it has been very solid and stable. It is just “makes sense” for the most part and so issues are very resolvable.

        If you use the AUR, you can get times when packages need to be excluded ( held back ) in order for the overall system to update. I do not see that as an Arch problem and it is easy to handle.

        One thing that is an Arch problem is that, if you do not update often enough, you can end-up with outdated keys that prevent you from installing before packages. The solution is just to update the keyring before updating everything else but this is confusing for a new user and kind of dumb in my opinion. I feel like the system should do this for me.

        Ironically, I find Arch is most stable if you update very frequently ( which makes the updates smaller and more incremental ). I do a quick update almost every day without any fear of breaking my system. Any “problems” I have had with Arch updates are trying to update a system that has not been updated forever. Even then, it is just a bit more work.

        Another thing that can happen if you leave it too long is that packages will have been replaced by newer ones. Keeping up to date means there are only going to be a small number of those. An update after a year can run into a surprising number of them.

        I dug out an old laptop that had Arch on it from 3 years before. Updating it was annoying but in the end it was totally up to date and stable.

        • @hottari@lemmy.ml
          link
          fedilink
          17 months ago

          Arch is not stable but it’s easy to fix issues arising from its rolling release nature. One of the ways being utilizing the AUR packagedowngradefor easy package version rollbacks. I should also note that the most common reason for Arch breaking is rarely ever because of the distro itself but because upstream has introduced breaking changes. You can see this when an upstream feature breaks in Arch, then Fedora picks up the same bug a few weeks/month later.

          Arch is however the most solid distro I’ve ever used since I began using Linux many many moons ago.

          One thing that is an Arch problem is that, if you do not update often enough, you can end-up with outdated keys that prevent you from installing before packages. The solution is just to update the keyring before updating everything else but this is confusing for a new user and kind of dumb in my opinion. I feel like the system should do this for me.

          Arch already does this. Could be that your install has the keyring refresh service disabled but I’ve had it enabled for a good while now and I’ve never encountered that outdated pacman keyring issue.

  • Presi300
    link
    fedilink
    English
    137 months ago

    NixOS and nix in general is incredibly complicated imo and the documentation is… let’s just say sub par. I’d go with arch unless you really just wanna learn nix.

    • @noli@programming.dev
      link
      fedilink
      17 months ago

      It’s incredibly complicated in the same way that ubuntu is incredibly complicated to a lifelong windows user.

      It just requires a bit of a paradigm shift which includes a learning curve but IMO once you’re past that point it’s intuitive and even easier than other distros.

      • Presi300
        link
        fedilink
        English
        1
        edit-2
        7 months ago

        You cannot compare NixOS to ubuntu… even for as a new user to more adept user comparison, NixOS is really complicated. I’m not saying it’s bad, just that the documentation on how it works could be better. I’ve tried to use NixOS and nix itself multiple times and they were a nightmare to setup each time, especially NixOS (nix itself isn’t as complicated to me but it has some annoying things with proprietary software and not integrating with desktops at all without using hacky scripts).

        • @noli@programming.dev
          link
          fedilink
          17 months ago

          Did you truly read what I said? The only logical way I can frame your comment is that you glanced at what I wrote down and started writing a reply.

          To a regular average windows user, ubuntu is incredibly complicated. When you learm how it works and how you’re supposed to use it, it becomes incredibly easy. The “hard” part of ubuntu is the paradigm shift from windows to the linux ecosystem.

          Similarly, to an average linux user nixos is “hard” because it does things completely differently from other linux distros. But once you’re used to it, it just makes sense and is easy.

          So the comparison is average windows user -> ubuntu vs average linux user -> nixos. Not average user -> ubuntu vs average user -> nixos.

          Finally: Nixos documentation is IMO 100x better than ubuntu documentation. Whenever I experience any issue with ubuntu it’s easier to just load up the arch wiki and hope it’s similar than it is to try and find anything specific for ubuntu that isn’t either 10 years out of date, a massive gaping security risk or just plain dumb. The nixos wiki may not be perfect but it has always been sufficient for my needs, and I have to run a decent amount of very niche pieces of software.

  • Lupec
    link
    fedilink
    10
    edit-2
    7 months ago

    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.

  • @hottari@lemmy.ml
    link
    fedilink
    77 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.

    • qaz
      link
      fedilink
      17 months ago

      NixOS sounds good on paper but in reality it is a long way from a mature product for desktop or general use.

      It’s 20 years old already, will it ever be ready at this point?

  • dinckel
    link
    fedilink
    67 months ago

    I’ve been using Arch for almost 8 years, and I enjoy basically everything about it. Since Nix has been so popular lately, I thought I’d take a look at it too. I like what it does, but the documentation is really poor, and the learning curve is insanely steep. When flakes and nix-command become stable, I’ll be giving it another shot

  • @XenBad@lemmy.world
    link
    fedilink
    47 months ago

    I use NixOS for University and would highly recommend it if you want a highly configurable system that’s declarative, however, NixOS doesn’t have great documentation for certain features and usually does things differently, so you’ll have to learn the Nix way of doing things. On the plus side, I’ve never been unable to fix my OS when it broke, you simply rollback, or if there isn’t a suitable rollback, you can plug in a live usb and set the system to use a specific commit (can’t remember the exact command for this and that’s presuming you store your config with git). Also according to these statistics nixpkgs has more packages than the AUR.

    • I think you just mean “declarative”. Highly configurable is literally any distro. I’d say NixOS is actually LESS configurable by design, but that is sort of the point: a repeatable image based on a template no matter what.

      • @XenBad@lemmy.world
        link
        fedilink
        17 months ago

        By highly configurable, I meant that you can configure it exactly to your needs, in the same way that you can with Arch.

  • Actual
    link
    fedilink
    37 months ago

    I think you are understating the value of the Arch Wiki and AUR.

    I am also a university student. I was required by one of my courses to program an Arduino using ArduinoIDE. My program, however, was not detecting my Arduino. By simply scrolling the Arch wiki, I found the issue, downloaded the fix via AUR and was able to get it working hassle-free. An equivalent of this process does not exist on NixOS.

    I do not know what programs your uni requires, but if you do plan on using them on Linux, Debian or Arch, or their many derivatives should be the go-to simply for documentation and quick-fixes alone.

  • Helix 🧬
    link
    fedilink
    English
    37 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.

  • @Drito@sh.itjust.works
    link
    fedilink
    2
    edit-2
    7 months ago

    I encountered limitations on NixOS, as instance Ly display manager, or using an app compiled by myself. Maybe there are solution but it is not always simple. Archlinux is way more flexible. Updates can theorically breaks the system , but since one year I never broke Arch despite updates on 200+ packages.

    Notice I favors minimalist graphic environments (WM that don’t need updates ) and minimalists apps as much as possible, such as MPV and nsxiv. I don’t fear of some keyboard shortcuts. This philosophy probably helps Arch updates. Sometimes I had problem on apps (Inkscape and Dolphin-emu), I use appimages for them. Nothing is perfect, but Arch put lighter roadblocks than NixOS.

  • @Nibodhika@lemmy.world
    link
    fedilink
    27 months ago

    First of all: Do you need reproductibility? I.e. having the exact same system on multiple machines? If not NixOS might be a lot more complex than what you need.

    Secondly: Instability does not mean what you think it means. People read instability and think the system will break, when instability actually means your system will be updated. In the context of a server, an update can be destructive, for day-to-day users it’s very rarely so.

    Finally: why Arch or Nix, why not Ubuntu, Mint, Pop or any of the other dozens of distros that are usually recommended for new users?

  • @utopiah@lemmy.ml
    link
    fedilink
    2
    edit-2
    7 months ago

    Going to sound like a boring pleb but… if your OS takes less than 1h to install and setup (which is my experience with Debian/Ubuntu on a SSD with a fiber connection, or even on a RPi with a modern microSD on an ADSL connection over WiFi) then it doesn’t matter much what you use. You grab a mug of coffee, click here or there from time to time and if your /home partition is saved you are good to go faster than most people even respond to an email.

    • @utopiah@lemmy.ml
      link
      fedilink
      17 months ago

      I should add if you want to tinker “shallowly” containers are amazing. If you need to tinker deep, using a VM proper or even another physical machine (with a KVM or another keyboard and monitor) while your main machine remains untouched, it should NOT affect your uptime.

  • @berber
    link
    27 months ago

    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!