I’ve been curious about NixOS for quite some time. Reading about it I couldn’t see how the config sharing capabilities, setup, or rollabck would be better than Arch and sharing the list of installed packages, using downgrade or chroot.

So I decided to run NixOS in a VM and I’m still confused. An advantage I can see for NixOS is its better use of cores and parallel processing for packages install.

It’s clear that I’m missing something so please help me understand what it is.

Edit: Thank you to everyone in this great community! It’s always so nice to have a constructive and sane discussion.
After reading so many comments, they all confirm what I’ve read before and I may realize that my real problem is already having a stable system and no need for the great NixOS options that are very neat but would not benefit my specific and simplistic needs. That being said I can’t refrain myself from being curious and will continue testing NixOS.

The need for only 2 config files is the top of the iceberg but hiding more complex configuration to rely on. Not that I really have too much spare time but I do enjoy learning and tweaking NixOS. With its current development state, things are changing a lot so it can keep me busy for months. That’s probably what I was mostly looking for: another toy to play with.

Along my journey I will learn a lot about NixOS and may find a feature that will motivate my switch to it. Thanks again for all your precious feedback!

I’ll also take this opportunity to share the best help I’ve found so far to start with NixOS: https://github.com/MatthiasBenaets/nixos-config And his 3 hours (!) video: https://m.youtube.com/watch?v=AGVXJ-TIv3Y

  • dinckel@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    11 months ago

    The appeal of it, to me, is the same as why Docker containers are really good. You write your definition, save it to git, for example, and if you ever need to setup your computer from scratch, if you restore that config, it’ll setup your computer exactly like it was before. But even besides that, being able to roll back if something goes wrong, is a big plus

    • www-gem@lemmy.mlOP
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      11 months ago

      That’s what I keep reading and why I would like to give it a try. For now I’m still confused how this is easier/more efficient than sharing your list of packages, restoring a backup, or using downgrade in Arch. I’m really interested because I like to try new stuff, especially if they bring something of interest.

      I really have hard time to see the difference for now after my first setup in a VM but also because imaging my full Arch system on a new machine 2 years ago only took me an hour and less than 10 command lines.

      Again, I’m genuinely trying to understand what I’m missing. From my reading NixOS seems to be the only distro I could switch to.

  • Ramin Honary@lemmy.ml
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    11 months ago

    What is good about NixOS (and GuixOS) is that they apply to package management the same principles that Git applies to managing source code. The Nix store is basically an append-only database (you might even call it a “blockchain”) of inter-dependent packages.

    So from an individual computer user’s point of view, it is much safer to install and roll-back software with Nix than with an ordinary package manager that might allow you to accidentally delete package dependencies and break your system. With Nix, you can install packages that actually do break your system, but because of the append-only nature, you can actually roll-back the install automatically right from the Grub boot menu, no need to re-install anything.

    Another advantage of NixOS, though this is more from a system operator’s point of view, is that you can guarantee reproducible builds. If the package you have installed has the same hash on all of your computers, that is a simple, human-verifiable proof that all of those systems are running the exact same build of the software. You can probably see that this is very useful for people running servers, like compute clusters, or doing things like A-B testing.

  • flashgnash@lemm.ee
    link
    fedilink
    arrow-up
    5
    ·
    11 months ago

    For me it’s the fact that I have one source of truth for my whole system config that I can stick in git

    If I want to clean up software I don’t need anymore I just remove them from the package list and they’re gone next rebuild

    Also means when I reinstall or setup a new system I just run the installer, do a git pull, rebuild and I’ve instantly got all my tools, configured just how I like them

    Also, if I want to make a big change I can build my system in a VM first to make sure it works first (not that I do that because it also lets me revert to an earlier build from grub if I need to)

    I’ve also got both my laptop and my PC on basically identical configurations from the same git repo with each of them having a smaller config file for hardware specific stuff