this post was submitted on 19 Jun 2023
32 points (94.4% liked)

Linux

48313 readers
779 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
 

Hi everyone!

I saw that NixOS is getting popularity recently. I really have no idea why and how this OS works. Can you guys help me understanding all of this ?

Thanks !

top 50 comments
sorted by: hot top controversial new old
[–] Veritas@lemmy.ml 11 points 1 year ago (29 children)

The increasing popularity of NixOS can be attributed to several factors that make it stand out among other Linux distributions. Some of the key reasons why people are switching to NixOS include:

  1. Reproducibility: NixOS allows for reproducible builds and deployments, ensuring that the same code will produce the same output across different environments[1][2].

  2. Easy rollbacks: NixOS has built-in rollbacks, which means that if a configuration change causes the system to be unbootable, it is easy to roll back to a previous working install[1][3].

  3. Nix package manager: NixOS uses the Nix package manager, which simplifies package management and system configuration[1].

  4. Multiple versions of the same package: NixOS allows users to have multiple versions of the same package installed, which can be useful for testing and development purposes[1].

  5. Stability: NixOS is considered a very stable platform compared to other Linux distributions, such as Arch Linux[3].

  6. Declarative configuration: NixOS uses a declarative configuration approach, which offers benefits over the imperative approach used by more traditional operating systems[4].

In addition to these features, the recent introduction of the open-source platform flox has made it easier for developers and enterprises to adopt NixOS. Flox expands on Nix's unique approach to package management and system configuration, providing convenience, collaboration, and control throughout the Systems Development Life Cycle (SDLC) [5]. This has led to an increase in the adoption of NixOS among developers and enterprises.

Overall, NixOS offers a combination of stability, reproducibility, and flexibility that appeals to developers and users who want a reliable and customizable Linux distribution.

Citations:

[1] https://itsfoss.com/why-use-nixos/

[2] https://techcrunch.com/2023/02/07/flox-raises-27m-to-bring-nix-to-more-developers/

[3] https://ramsdenj.com/2017/06/19/switching-to-nixos-from-arch-linux.html

[4] https://www.anthes.is/nixos-pros-cons.html

[5] https://finance.yahoo.com/news/flox-raises-27-million-introduces-140100442.html

load more comments (29 replies)
[–] featherfurl@lemmy.ml 8 points 1 year ago* (last edited 1 year ago) (1 children)

Here's the straightforward version of why I use it:

  1. The entire state of your operating system is defined in a config file, and changes are made by changing the config file. This makes it super easy to reproduce your exact system many times and to know where all the many different configuration elements that describe your system are located.

  2. Updates are applied atomically, so you don't have to worry about interrupting the update process and if it fails, the previous state of your system is still bootable. By default every time you change something, you get another option in the boot menu to roll back to.

  3. Making container-like sub systems is super easy when you're familiar with nix, so you can have as many different enclaves as you like for different software versions, development environments, desktop setups, whatever without taking a performance hit. Old versions of stuff are very accessible without breaking your new stuff.

  4. The package manager has a lot of software and accessing nonfree stuff is straightforward. Guix looks rad, but nix ended up being the more practical compromise for my usecase. I didn't want to have to package a heap of software the moment I made the switch.

load more comments (1 replies)
[–] Tilted@programming.dev 8 points 1 year ago (9 children)

I used NixOS for a couple of years. My experience is like this:

  1. It is a rolling release (mostly)
  2. You write a declarative configuration for your system, e.g., my config will say I want Neovim with certain plugins, and I can also include my Neovim configuration
  3. It is stable, and when it breaks it is easy to go back
  4. Packages are mostly bleeding edge
[–] Atemu@lemmy.ml 3 points 1 year ago

Note that there's both the rolling unstable channel and a bi-annual stable release channel.

[–] L0Wigh@sh.itjust.works 2 points 1 year ago (2 children)

The configuration stuff seems great. I guess it reduce the struggle of porting a full config from one pc to another right ?

load more comments (2 replies)
[–] priapus@lemmy.one 2 points 1 year ago

Important to note that NixOS has both a rolling release and point release version.

load more comments (6 replies)
[–] federico3@lemmy.ml 6 points 1 year ago (1 children)

It's in no way "everyone", just a vocal minority.

[–] Eufalconimorph@lemmy.ml 4 points 1 year ago* (last edited 1 year ago)

I use ~~Arch~~ NixOS BTW.

[–] JASN_DE@feddit.de 6 points 1 year ago (2 children)

everyone

Now that's what I'd call a stretch...

[–] barsoap@lemm.ee 6 points 1 year ago

Indeed, why would I switch, already have been running NixOS for 10+ years.

load more comments (1 replies)
[–] le_saucisson_masque@lemmy.world 5 points 1 year ago (1 children)

I keep seeing trends with Linux distribution like teenager looking for new fashion.

I think it’s mostly the very young Linux user who hope from one distribution to the another over and over whereas many just stick with what they got : Ubuntu, Debian, mint, maybe fedora.

NixOS is certainly interesting tho.

load more comments (1 replies)
[–] lloram239@feddit.de 5 points 1 year ago

NixOS is the only[1] Linux distribution that feels like it is build around Free Software. Meaning upstream Git repositories can be treated as first-class citizen and installed directly without convoluted binary packaging system (that still exists in the background, but only as cache to speed up build times). Nix also makes it very easy to upgrade, downgrade, side grade, patch, override dependencies or otherwise change packages, or even just keep multiple versions of the same software around. Something many other distributions still struggle with or make completely impossible with the distributions own tools. Even the act of installing software in Nix becomes somewhat unnecessary, as you can just run software straight from the Git repository.

And best of all, it's all based on a very simple and transparent packaging system, if you ever used GNU stow, kind of like that, it's all held together with a bunch of symlinks and some environment variables. No contains, no ostree, none of those ugly workarounds, just plain old Unix stuff that you can find and grep through as much as you like.

Simply put, NixOS puts the joy back in Linux, while other distributions like Ubuntu try to actively trash their reputation with a proprietary App store and others like Debian just stagnate around and are still stuck with the same old packing system that was state of the art 25 years ago and hasn't improve much at all since than. NixOS just provides a dramatically cleaner and simpler approach that also happens to be vastly more powerful.

Another cool thing, if you don't wanna switch distributions just yet and reinstall the full NixOS, you can just use the Nix package manager itself on whatever distribution you are already using.

[1] There is also GNU Guix, which is basically a reimplementation of Nix with Guile/Scheme

[–] mrh@mander.xyz 4 points 1 year ago* (last edited 1 year ago) (1 children)

I daily drive GNU Guix instead, and I would strongly recommend any emacs and/or lisp enthusiasts interested in the benefits of functional, reproducible, declarative, and hackable system management to give it a try!

[–] ncrranger@sh.itjust.works 2 points 1 year ago (3 children)

Do you run the gnu guix distro or just use the package manager? Because iirc it uses only free software, even for drivers. So I imagine it is not that easy to find compatible hardware.

load more comments (3 replies)
[–] moldyringwald@kbin.social 3 points 1 year ago (5 children)

It's insanely stable but you have to have a lot of linux/programming knowledge to do even the simplest things like installing/updating your software or making little tweaks. I played with it for hours the other day and I'm just too dumb to figure it out lol I think it's just a super stable highly customizable distro for power users and a lot of people like that. If you can get over the learning curve it's a pretty powerful and unique os

[–] Chobbes@lemmy.world 3 points 1 year ago

It's kind of funny because I'd put NixOS on a complete newbies computer for sure, and recommend it to an expert... But I'm less sure if I'd tell a random mid-intermediate Linux user to switch.

Like if Grandma wants Linux on their computer to do some internet browsing for some reason... I'd absolutely put NixOS on it because it's easy to manage the system for them... But somebody who is a little familiar with Linux already might be more confused about the differences. It's kind of the ultimate beginner distro and the ultimate power-user distro, but a bit awkward between those extremes, haha.

[–] Glome@kbin.social 2 points 1 year ago

It's true that it can be a powerful distro but I've also heard from some users that the advanced-level documentation is lacking and only limited to forums and source code. I think maybe if the documentation was more thorough I would try nixos.

load more comments (3 replies)
[–] chris@lem.cochrun.xyz 3 points 1 year ago

I've been using it for over a year and love it. A config file for your entire system, and built in rollbacks anytime something goes wrong. One language to configure everything, although in practice that doesn't always work. But I love it.

Some others have started why it works, here is some how. Nixos completely disregards the fhs. Packages don't install to anywhere standard, every package and configuration change gets it's on directory in /nix/store but through smart use of tracking everything there, it symlinks all those files to proper places and sets up the environment for them to know where libraries are.

This is then also why you don't need sudo privileges to install things. Your profile has an environment that is aware of your users packages and configurations, the system itself isn't effected because everything is symlinked.

Then because every update means new directories in /nix/store you can role back to your last configuration because plasma broke something or whatever.

However, it's a LOT to learn. Best place I know of is https://piped.video/watch?v=AGVXJ-TIv3Y&t=0

This guy did a good job for me. Hope this helps!

[–] Herbstzeitlose@feddit.de 3 points 1 year ago (2 children)

Because it’s the latest Cool Nerd Thing™ like Arch before it, and Gentoo before that. Most of the people raving about it probably don’t have much use for its features.

[–] IDe@lemmy.one 3 points 1 year ago

The features themselves are very useful for basically any user. Whether they are worth the non-standardness and issues that come with it is another question.

load more comments (1 replies)
[–] Syudagye@pawb.social 3 points 1 year ago (3 children)

SYMLINKS

SYMLINKS EVERYWHERE

(also 6000 packages intalled on my system for some reason lol)

load more comments (3 replies)
[–] count0@lemmy.dbzer0.com 2 points 1 year ago (4 children)

For those who like a video format, I found this introduction quite informative.

[–] quaddo@kbin.social 2 points 1 year ago

Thanks for this, it was definitely a nice overview. Not the first time I'd heard of NixOS, but I do seem to be seeing more frequent and more substantial discussions of it.

What I'm getting from all this, is that it looks to be a great way to set up reproducible desktop environments. And servers too, I suppose.

What I'm not getting from this: a compelling reason to switch from established players like RHEL and Ubuntu in combination with cloud-init and Terraform and the likes of Chef/Puppet/Ansible/Salt to spin up a cluster in the cloud, reconfigure, tear down, etc.

In case anyone is misreading me: this is not a dig at NixOS. It definitely looks interesting. Like, to the point that I'll at least spin up a VM on my Manjaro laptop and see whether I should perhaps consider wiping and reinstalling with NixOS. The "configuration through code" is extremely appealing here.

My concern here is corporate inertia. And before anyone gets gets ready to launch a diatribe about how corporations don't decide what the best tech is, I will agree with you. I've been around a while, and excitedly watched as Unix ramped up and displaced platforms like VAX/VMS and AOS/VS, using smaller and faster hardware. Then along came Linux and the battle for which distros would dominate.

As for configuration through code, I've been keeping a keen eye on things (tinkering when it's been possible to do so) since the days of cfengine and Jumpstart. I used to share this site with anyone that would listen to me; it's dated now, but the underlying principles are (were?) solid: http://infrastructures.org/

So for now, I think I'll have to limit my professional NixOS usage to tinkering and potentially useful side projects. For personal usage? Yeah, it might become my daily driver, but I need to find the time to tinker.

I will say that I'm presently involved in an effort to test something out that has my company's product available using rpm-tree. Not my decision, this is all being driven by a customer that has a lot of clout; they really, really want to use rpm-tree. It's proven to be a bit onerous at times.

What this NixOS discussion has managed to do for me is to have me wondering whether a NixOS approach would have worked out better; my sense is that yeah, maybe it would have. But my feelings here might simply be the result of "woo, shiny new object", which has definitely colored my opinions of things in my career of ~35 years. Something that I've had to restrain my excitement over, pending corporate sanity checks.

[–] Clairvoidance@kbin.social 2 points 1 year ago* (last edited 1 year ago)

I was zzz until i heard having the ability to have different versions of packages installed at the same time without having the flatpak issue of having to have duplicates of the same package.
All-in-one config is definitely something I would've hoped Arch had (I just like the idea of everything user-related stored within /home because that makes fucking sense, no, homed doesnt do exactly that) so I'll definitely check it out if my harddrive ever crashes or something.

load more comments (2 replies)
[–] DAT@feddit.de 2 points 1 year ago

nah

didn't have enough time during the last half a decade to learn yet another thing

might be better fit than my current debian setup - but how would I ever know, since my current thing is good enough?

[–] fazo96@lemmy.trippy.pizza 2 points 1 year ago (1 children)

I have been using for years on servers. My lemmy instance is hosted on it.

Although for desktop I had too many issues back in 2019 so I ended up back to Arch Linux and then EndeavourOS

Would be fun to try again to use it on desktop

load more comments (1 replies)
load more comments
view more: next ›