36
submitted 10 months ago* (last edited 10 months ago) by wwwgem@lemmy.ml to c/linux@lemmy.ml

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

you are viewing a single comment's thread
view the rest of the comments
[-] ultra@feddit.ro 0 points 10 months ago

Just wait until you mess up something like DNS or delete every text editor and you'll be grateful for rollbacks.

[-] wwwgem@lemmy.ml 1 points 10 months ago* (last edited 10 months ago)

Can you elaborate? I messed up DNS when I started with Arch and it was easy to recover from that. For text editing, I'm using neovim and can go back with undotree. Of course, if I delete my file and remove it from the trash it's too late. Can you recover deleted files with NixOS?

[-] ultra@feddit.ro 3 points 10 months ago

That's not what rollbacks are for.

On NixOS, to change most configs, you need to rebuild.

To rebuild, you need internet.

If you mess up DNS, you need to rebuild to gain internet.

But you need internet to rebuild, so you can't.

That's when rollbacks are useful

[-] wwwgem@lemmy.ml 1 points 10 months ago* (last edited 10 months ago)

Got it. So you can rollback without Internet access. I get that point and Arch can also do that with pacman -U. Again I feel like I'm just stupid and am missing something. Like I said I genuinely try to figure out what it is. NixOS would be the only distro I could consider switching to and that's why I'm currently testing it.

[-] fishinthecalculator@lemmy.ml 5 points 10 months ago

They do very different things even if the outcome is the same. You are not rollingback your system by downgrading each package. You are statefully changing your filesystem. Rollbacks in Nix and Guix are internet free, atomic and reproducible because they amount to changing the target of a single symlink

[-] Laser@feddit.de 4 points 10 months ago

One issue with rollbacks Arch has is that there's basically only up to three valid configurations available at any time. These are your current system configuration (oldest state), upstream repositories (newest) and your local database copy (somewhere in-between, though all three states can be identical, e.g. straight after Syuing). By definition, you can't convert your system configuration back to an older one because it's the oldest one of the three already. What you can do is mix your current oldest configuration with packages from the cache, older or newer doesn't actually matter. But you're not getting back the old state really, you're creating a new one that's different from Arch's repository.

A configuration on NixOS includes all exact package versions and their exact configurations. No exceptions.

If you actually need these guarantees is a different question. I used Arch for 15 years and never had significant issues. I switched to NixOS instantly after trying it on an old notebook and immediately recognized that the whole approach suits me so much better that I switched almost all machines over by now.

[-] wwwgem@lemmy.ml 2 points 10 months ago* (last edited 10 months ago)

Very nice explanation. I also recognize this point for NixOS.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 which means not being in need for some "advanced" recovery options. That being said, I'm still curious and will continue testing NixOS.

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. Will see if I actually switch to NixOS at some point. Thanks again for your feedback.

this post was submitted on 13 Jan 2024
36 points (82.1% liked)

Linux

48159 readers
753 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS