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 !

  • root@precious.net
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    $9,000/mo? Have you considered not using the most ridiculously expensive method possible?

  • Veritas@lemmy.ml
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    3
    ·
    1 year ago

    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

    • NathanUp@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I would love to have #4 on Arch / EndeavourOS.I recently had my Scribus install (SVN from the AUR) break due to Arch moving to some newer library. There really isn’t an easy way to solve this AFAIK.

    • Arthur Besse@lemmy.mlM
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      this comment reads suspiciously like it was written by an LLM (eg ChatGPT). was it? please don’t do that!

        • RosalynKirk@kbin.social
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          If OP wanted a response from an LLM, they would have typed their question into an LLM. The least you could do is label it as such.

          • Veritas@lemmy.ml
            link
            fedilink
            English
            arrow-up
            14
            arrow-down
            6
            ·
            edit-2
            1 year ago

            I use an LLM to edit everything I write. Does this mean I have to label everything as LLM-generated? Although I am the one doing the job, in the end, I’m just copy-pasting the output from the LLM.

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

              Rule or not, it’s pretty lame, look at the size of your post compared to how much info it gives, had you copied a article from some basic linux news stite, it would have given mostly the same output, now think about what linking a page to an article about nixos as a response to op trying to start a conversation about it would look like, rude.

            • Zamboniman@lemmy.ca
              link
              fedilink
              English
              arrow-up
              3
              arrow-down
              1
              ·
              edit-2
              1 year ago

              I use an LLM to edit everything I write.

              May I invite you to consider the pitfalls of such an approach?

              Does this mean I have to label everything as LLM-generated?

              Yes, that would be reasonable imo

              • fruitywelsh@lemmy.ml
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 year ago

                I’ll type things up and ask an LLM like petals or open assistant to phrase it in new or clearer way. Hit or miss, but sometimes it helps.

              • Veritas@lemmy.ml
                link
                fedilink
                English
                arrow-up
                17
                arrow-down
                4
                ·
                edit-2
                1 year ago

                Why don’t you label your name in every answer, so we can check if you are hallucinating or making things up?

                • AgreeableLandscape@lemmy.mlM
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  edit-2
                  1 year ago

                  Why don’t you label your name in every answer

                  You mean like a username that is listed in the header of every post and comment?

        • Arthur Besse@lemmy.mlM
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          1
          ·
          edit-2
          1 year ago

          thanks for clarifying. i’m deleting your generated comment per rule 4 (spamming) as well as two other generated comments you posted elsewhere; if another admin wants to undelete any of these i would be surprised.

          please do not post LLM-generated comments without clearly labeling them as such. imo this is common sense, and doesn’t need its own rule, rule 4 is sufficient.

        • AgreeableLandscape@lemmy.mlM
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          edit-2
          1 year ago

          The admins did not remove the comment, a community mod did. Mods can impose further restrictions on their communities on top of instance wide rules (within reason of course), including banning LLMs. Lemmy.ml at least does not have a blanket ban on LLMs, but generally it’s expected that, 1, you should not post LLMs excessively, we mainly want to host discussions by humans, 2, you should disclose it’s from an LLM and which one it’s from, and preferably add to what it says with your own comments or analysis. If it’s a mix of LLM and your own writing, say so at the start of the comment, but if the community directly disallows LLMs then you shouldn’t post it there at all.

        • Arthur Besse@lemmy.mlM
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          2
          ·
          1 year ago

          Do LLMs give citations?

          do they ever!

          (The citations in this comment appear to be all real links about NixOS, but they are not particularly relevant to the places in the comment where they’re cited.)

  • lloram239@feddit.de
    link
    fedilink
    English
    arrow-up
    5
    ·
    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

  • Tilted@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

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

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

      • Sr Estegosaurio@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        You can even define configurations for different systems/hosts/users from a single place. I’ev atomized my config and I can reuse lots of parts for my different machines. Also my user config is nearly identical (except hardware specific things).

      • Tilted@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        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.

    • priapus@lemmy.one
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

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

    • SirNuke@kbin.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Are you still using it and happy with it? I’ve been increasingly using single purpose dev VMs in a server, and a declarative configuration system would make the process of spinning them up faster and more robust. My current shell script system is clunky, and I’ve been looking at Ansible.

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

    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.

    • SolemnAttic@feddit.de
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      This very much. I used to have lots of unchecked config and state files everywhere on Arch. Now everything is checked in and wiped on boot so if something breaks after a reboot i know what broke.

      Like how the opengl rendering did due to nixpkgs version differences

  • Litanys@lem.cochrun.xyz
    link
    fedilink
    English
    arrow-up
    2
    ·
    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!

  • Lalelul@feddit.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I switched around one and a half years ago. I must say, there are some hurdles to using NixOS. Mainly I dislike that it always takes around 20 times the effort to start and project. You make up for the initial time investment, because you end up with a far more stable setup, but still it does take some willpower to get things started.

  • fazo96@lemmy.trippy.pizza
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    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

    • dbemol@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      1 year ago

      I think I will give it a try on a server first, I don’t have a playbook or script for a reproducible set up (yet), so I may as well use Nix to see if it’s worth the hype

  • mrh@mander.xyz
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    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!

    • NCR Ranger@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      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.

      • mrh@mander.xyz
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 year ago

        I run the complete system. It’s true that the standard iso comes with the linux-libre kernel and the standard channel (think repo) contains only free software. However there is the nonguix channel which comes with the full linux kernel, and all the proprietary drivers you could ask for.

        Nonguix offer an iso with the full kernel too in case you have a proprietary wifi card and don’t have ethernet for the initial setup. The nonguix README I think is pretty clear, but Systemcrafters also made an excellent guide for doing this.

        My wifi card unfortunately requires proprietary drivers and I have personally never had an issue with guix + nonguix for all my software needs, proprietary and otherwise.

        Hope that helps profligate!

  • le_saucisson_masque@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    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.

  • Syudagye@pawb.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    SYMLINKS

    SYMLINKS EVERYWHERE

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

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

      Doesn’t it have a garbage collector like guix does (guix gc), which cleans up everything in the store that isn’t needed anymore?

    • Atemu@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      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).

  • ambrosia@kbin.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    because it’s good as hell and i don’t want to have to spend time having to rebuild and reconfigure fresh OS installs or risk breakage when I could just use a config file that I know already works