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

  • chayleaf@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 year ago

    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
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

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

      Thank you very much

  • 20gramsWrench@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    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.

  • Fuck Yankies@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    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
      link
      fedilink
      English
      arrow-up
      1
      ·
      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̸̖̣͠.̵̯̾͘

  • Frater Mus@lemmy.sdf.org
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    1 year ago

    why considering to switch on NixOs over other distro?

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