Here's the straightforward version of why I use it:
-
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.
-
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.
-
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.
-
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.
everyone
Now that's what I'd call a stretch...
Indeed, why would I switch, already have been running NixOS for 10+ years.
It's in no way "everyone", just a vocal minority.
I use ~~Arch~~ NixOS BTW.
Why do I get nothing but first dates?
By the way, I use NixOS.
I used NixOS for a couple of years. My experience is like this:
- It is a rolling release (mostly)
- 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
- It is stable, and when it breaks it is easy to go back
- Packages are mostly bleeding edge
Note that there's both the rolling unstable channel and a bi-annual stable release channel.
Important to note that NixOS has both a rolling release and point release version.
The configuration stuff seems great. I guess it reduce the struggle of porting a full config from one pc to another right ?
Yes absolutely. It is really great. It is also a source of frustration, e.g., missing configuration options, non-obvious options and so on. Overall it works well.
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
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.
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!
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
NixOS is a fully declarative and reproducable system.
What this means is that you can create a single configuration.nix
, which includes all of your applications, settings, aliases, environment variables, user account + groups, etc., and copy that over to another NixOS machine (including different architectures) and run nixos-rebuild boot
to completely reproduce the system on that other machine.
The nix package manager is also really good at telling you if the configuration will break anything, where, and how, and refuses to apply until the issue is fixed.
Also every time you use nixos-rebuild
, it creates a new generation of your NixOS install meaning if something ends up breaking, you can reboot into the old system.
So for example, I can theoretically have the exact same configuration across my desktop, laptop, phone, server, etc., minus the automatically generated hardware-configuration.nix
, which is specific to the hardware.
Also Nix supports package overlays, which means that you can modify an existing package while the maintainer still keeps it up to date.
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!
Overlays. Good package management, and lot of stability stuff.
Linux
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
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0