this post was submitted on 03 Jul 2023
0 points (NaN% liked)

Linux

48329 readers
639 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, someone can explain, in simple words, why considering to switch on NixOs over other distro? And the use case? I think would help a lot of people (including me) to understand it better :D

top 6 comments
sorted by: hot top controversial new old
[–] chayleaf@lemmy.ml 2 points 1 year ago* (last edited 1 year ago) (1 children)

You know why reinstalling Linux is annoying? Because you have to remember (or write down) every piece of config you ever changed. Dark mode in KDE? Change it in settings. Some systemd unit tweak? Change it in /etc/systemd. Want to run some commands at boot? Use systemd (see above), or write an initrd hook (distro-specific). Need a specific version of an app? Need some files in /opt? Need certain packages installed? You better remember to do that!

In NixOS, you "reinstall" your OS every time you change a single setting, because reinstalling NixOS isn't scary at all - everything that needs to be changed is configured in your configuration - just make sure /home and /var/lib are saved (and perhaps some other dirs, I have root on tmpfs and bind mount all persistent files I need to ensure I know what needs to be preserved on clean reinstall and what doesn't).

Want to move it to a different PC? No problem, copy the files in /home and /var/lib and simply install NixOS using the configuration you already have on the new PC. Want to create a boot option with slightly different kernel or kernel options, or maybe even another DE? No problem, specializations got you covered. Something broke and you want to try an older version of your system? Just select it in your bootloader, it will "install" the old version of your system on boot!

And of course, this also means it's easy to share configurations for specific use cases. Want to run on some specific hardware that doesn't work out of the box? Perhaps nixos-hardware got you covered. Want a certain program set up? Maybe there's already a NixOS option for system-level config or a home-manager option for user-level config, worst case you can write it yourself and share for everyone else in the community using flakes, and maybe open a PR to nixpkgs/home-manager. Want to share configuration between systems? That's easy, put them in the same flake and write a common module shared between all of your systems.

Basically, if you're fine with whatever comes out of the box in any Linux distro, you don't need NixOS, but if you need configuration, if you run servers, it is a lifesaver. I switched from Arch, no regrets. I run my personal laptop, my server, which I effortlessly migrated from Oracle Cloud when they quit Russia, and my router on it, here's my NixOS/home-manager config.

The only downsides are the learning curve and the fact that you can't "just" run programs that expect a FHS layout. You can do it with workarounds like steam-run or appimage-run anyway, but overall be prepared to learn to package stuff for NixOS. Also if you have no experience with functional programming, the Nix language may be hard to understand at first.

Edit: home-manager is also available on all Linux distros and iirc even MacOS. Nix-the-package-manager is also available on all Linux distros and MacOS, and it's useful for creating consistent developer environments, but it's NixOS that really makes Nix shine.

[–] pinchcramp@lemmy.dbzer0.com 1 points 1 year ago

This is probably the most comprehensive, yet easily understandable explanation of NixOS I've ever read.

Thank you very much

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

Do not turn to the Lovecraftian package manager unless you dare. It consumes all, it is all. Your flesh and mind will be ripped in twine across dimensions... if you are a package.

If you're binary your head will be ripped open and it's contents modified to fit a new reality.

There is no package, nor source, nor binary that shall be exempt.

All shall be consumed, digested and brought to a new reality.

It will kill the old gods, as there will be only one package manager.

It will consume you.

[–] 2xsaiko@discuss.tchncs.de 1 points 1 year ago

Can confirm. My mind has been altered by the mere touching of a keyboard that has NixOS living behind it. My soul has been replaced by the concept of a derivation. The cables in my computer and my vęins have swapped places. The f̸l̴e̷s̶h̵ is weak. I have long since lost control of the Flakes that now grow out of my skin. When you install NixOS, you and your computer are henceforth marked by the Great Old Ones. You will no longer be able to use a normal Linux distribution. The mere thought of using a normal Linux distribution will cause your skin to feel like it is being burned alive.

A̸̦̙̎̅̊ṇ̸̯̽̾d̵̨̠͈͐ ̵̧̗͊̇I̸̧̩̜͊̓͂ ̵̞̱͎͗͂w̵͔̓o̷͍͂̈́u̸̥̯͋l̵̠̞̳̅͠d̴̹͛̃͝n̷̛̯̮̭͌͝'̵̜͉͕̚͘͝t̷̡̜̄ ̸͈̥̄̄h̷̺͛͛̍à̴̢̐v̷̪͍̾e̴̢̯̦̒͌̿ ̶̮̽̀̏ḭ̴̝̠̋̾t̶̬̩̾͒ ̵̱̼̥͆͑a̷͚̒ǹ̸̤̊y̶̤̎̾̈́ ̴̱̎ò̶̦̦̂̚t̵͚͙̽̓͜h̵̖̤̍̈́ȇ̶̳͇̈ṟ̴̇ ̴͔̮̱̏̔w̴̺̖̋̌a̸̞̹̤͗y̸̖̣͠.̵̯̾͘

NixOS will make you cofee every morning, fix your car, make your waifu real and establish a long lasting commune system in your country of residence.

[–] fratermus@lemmy.sdf.org -1 points 1 year ago

why considering to switch on NixOs over other distro?

You like linux but really miss the Windows registry :-P