NixOS is better because...

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: github.com/MatthiasBenaets/nixos-config And his 3 hours (!) video: m.youtube.com/watch?v=AGVXJ-TIv3Y

onlinepersona,

Better in some ways, but it has the worst documentation of any distro I’ve seen so far. nixlang.wiki is trying to improve that

CC BY-NC-SA 4.0

Laser,

How to read NixOS documentation:

  1. Go to wiki, see if topic exists
  2. If it does, notice how it doesn’t cover your case
  3. Use the hints from the wiki to get your search engine redirect you to ryantm.github.io/nixpkgs/
  4. Notice it still doesn’t cover your use case
  5. Use search engine again, this time with the hints from aforementioned page, to arrive in the proper code in the nixpkgs repository
  6. Read annotated source code to see what actually happens

Yeah, this is how I found github.com/NixOS/nixpkgs/blob/…/make-wrapper.sh yesterday because I wanted to install some shell scripts that needed to be adapted.

Don’t get me wrong, maintaining a distribution the way NixOS is a huge effort and I can’t praise the maintainers and developers enough. The ecosystem they’ve built is unlike I’ve seen anywhere, and the technical foundation is sound – in fact I’d wager more sound than what commercial distributions offer. The latter just have more grease. But I do understand the criticism about lacking documentation. But human labor is scarce, and I mean look at me posting this here instead of improving it.

There’s also no good guidance or best practices for packages in nixpkgs and stuff is permanently changing (which in my opinion is good). E.g. did you know that new derivations should be sorted by letters, not categories, and not go into all-packages.nix? At least if your derivation doesn’t require fancy attributes (pardon me if that is not the correct term). Or that stdenv.mkDerivation rec {…} is not best practice, but rather stdenv.mkDerivation (finalAttrs: {…})? And why the latter even works?

Writing good documentation for a system, especially one that’s permanently evolving, is not easy, and I prefer all efforts going to actually maintaining and evolving the system itself than trying to get the perfect documentation that’s outdated in a matter of time. And without trying to gatekeep it, NixOS is a distribution for advanced users. I recommend it to everyone who has a solid understanding of how a Linux system is composed because I think it’s important what NixOS abstracts away from you. And as an advanced user, reading commented code once in a while is fine in my opinion.

onlinepersona,

The problems with nix/nixos documentation are:

  • documentation isn’t sexy so not many want to do it
  • documentation is difficult to be written by beginners because… they’re beginners
  • nix/nixos maintainers undervalue documentation efforts - I’ve tried to get in pull requests, but they just stall (not reviewed, nitpicked to death, simply not merged, etc.)
  • it isn’t generated from source code

Also, the very top heavy decision making process harms the community. Some person with hundreds of commits can push through nearly any change (good or bad) relatively quickly, unless other frequent contributors are really really against it. However, fresher contributor with a great change is forced to go through a never-ending process and few stay to actually finalize it.
Pushing to master was not seldom for a long time and IINM it isn’t possible anymore. But maintainers can simply (and do) create a PR, make a change and merge it.

These difficulties just make me want to fork nixos. For documentation, at least there’s nixlang.wiki

CC BY-NC-SA 4.0

kionite231,

for me personally I like to be able to install software temporarily using nix-shell command it’s awesome. the installed program will be gone once you leave the nix-shell. It’s just awesome for me.

dinckelman,

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

wwwgem,
@wwwgem@lemmy.ml avatar

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.

sashanoraa,

Because your Nix config also configures your software, not just installs it. Admittedly, with base NixOS that’s more true with server software than desktop. But with the addition of home manager you can also configure many desktop apps in your Nix config.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • fightinggames
  • All magazines