this post was submitted on 19 Jun 2023
38 points (95.2% liked)

Linux

48344 readers
455 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 !

(page 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Oh boy my two cents time!

I love the concept of NixOS. A fully declarative , reproduceable system from a single config repo! Sounds theoretically like it would be my kind of thing.

Sure, theoretically, I could have a fully reproduceable system. The time spent declaring that fully reproduceable system though... I remember the first time I was trying to get my usual disk setup of, a luks encrypted btrfs partition with multi-factor enabled decryption/authentication.

On a normal install it would take like a day at worse to install your distro. My first attempt with NixOS took me almost 4 days of screwing around in configs. 2 of those days were probably cumulatively spent waiting for the config option list of the nixos manual to search for text. And the number of redundant config options which all do the same thing! Or, are supposed to all do the same thing but in actuality, only one of them does the thing they are supposed to.

I really want to love NixOS but it always ends up feeling like an exercise in my patience and time to do even the simplest of things. As such I find myself asking the question of, am I going to spend so much time reinstalling my distro that it's ever worth this initial investment?

Anyways, rant over. I actually have been debating switching back over for another try again myself I just have some very frustrating memories of my first attempts with the distro.

load more comments (1 replies)
[–] [email protected] 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?

[–] [email protected] 1 points 1 year ago

Never tried NixOS but I think I will try Qubes-Whonix next: https://www.whonix.org/wiki/Qubes

[–] [email protected] 1 points 1 year ago

Overlays. Good package management, and lot of stability stuff.

[–] [email protected] 1 points 1 year ago

It's been around for like a decade, but was recently make more approachable by offering a graphical installer.

[–] [email protected] 1 points 1 year ago (3 children)

I've been looking at it after numerous times I update Fedora only to have some tool break that I use daily. Then I spend a chunk of the day getting Virtualbox working again so I can do my job (write code for websites).

I haven't made the jump, but it looks very interesting.

load more comments (3 replies)
[–] [email protected] 1 points 1 year ago (4 children)

SYMLINKS

SYMLINKS EVERYWHERE

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

[–] [email protected] 1 points 1 year ago

Well, Nix has a very liberal definition of a "package". Your web browser, its wrapper script, a service file, a config file; those are all technically "packages" (or "derivation" as Nix calls them).

load more comments (3 replies)
[–] [email protected] 1 points 1 year ago

People love Nix because of the OS configuration based around a single config file. Essentially, you define your system configuration in this file, including installed programs, then you rebuild your system based on that configuration.

The beauty here is that you can easily move this file to another machine running NixOS and reproduce your configuration there. You can also roll back changes by simply rebooting and choosing the last known good build and you're back in business.

[–] [email protected] 1 points 1 year ago (2 children)

I will switch as soon as I can get proprietary Nvidia drivers to work on my laptop.

load more comments (2 replies)
[–] [email protected] 1 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!

[–] [email protected] 1 points 1 year ago (1 children)

I tried it about a year ago and I don't know it did not convince me. Yeah it might be great for some niche developer oriented needs or deployment but for a normal OS usage, meh. I kind of see it as a current hype, just like crypto/NFT before, and AI now. For normal everyday usage I find openSUSE Tumblweed much more suitable and much more widely applicable.

[–] [email protected] 1 points 1 year ago

Its getting better which each release

load more comments
view more: ‹ prev next ›