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 !

  • Tilted@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    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
    • 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.

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

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

  • lloram239@feddit.de
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    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.

    As for downsides: Nix does not play nicely with packages, scripts and programs made for other distributions, like at all. /usr/bin/env and /bin/sh are about the only files it has in common with other distributions, the whole standard Linux file tree is completely empty otherwise. There is buildFHSUserEnv to work around that, but that requires a bit more knowledge and effort from the user.

    [1] There is also GNU Guix, which is basically a reimplementation of Nix with Guile/Scheme

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

  • Herbstzeitlose@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    Because it’s the latest Cool Nerd Thing™ like Arch before it, and Gentoo before that. Most of the people raving about it probably don’t have much use for its features.

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

      The features themselves are very useful for basically any user. Whether they are worth the non-standardness and issues that come with it is another question.

    • Speedmaster@lemmy.ml
      link
      fedilink
      arrow-up
      0
      arrow-down
      1
      ·
      1 year ago

      That is the main reason I can’t use my laptop with linux. It has a 3060 in it. I work as a dev and need to use 2-3 external displays with my laptop. The driver combined with x or wayland is atrocious, I tried 20 distros and I can’t get it to work. The saddest thing is that none of the tech is exotic in any way. It’s just HDMIs and AOC 24 inch monitors…

  • curtismchale@lemmy.ca
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    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.

    • tetris11@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      I’ve made the jump twice, and jumped back twice.

      Conda and any other reproducible computing library that relies on LHS Linux filesystem just doesn’t work on it (okay it does, but more as an obstacle)

      I’m okay with having nix the package manager on my default arch system though, since it is incredibly useful for cross compiling, and it let’s me modify my system however I want.

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

        Have you tried putting it into a buildFHSUserEnv?

        I also often put the “dirty” packaged AI/python stuff (which is unfortunately quite a lot) into Dockerfiles if I don’t want to package it cleanly with Nix.

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

          I did, but it still doesn’t quite act right, especially if I need to build extra packages within the environment

  • datendefekt@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    Glancing over the website, I thought it’s an immutable OS, like Fedora Silverblue. I could imagine that it might be cool to use with Ansible and stuff. But for an average user? I can’t really see the advantages in respect to the work you have to put in.

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

      It is an immutable distro, altough it isn’t image-based like Fedora’s rpm-ostree.

      NixOS basically replaces Ansible because the Nix package manager achieves the same goals already (configuration, deployment, …).

      But I agree, the work necessary to put into this non-standard distro makes it hard to recommend for a casual user.

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

      NixOS is not immutable in the way Fodora Silverblue is, and way more declarative and reproducible than Ansible. But yeah it is not something you “need”. Other distros work too, but NixOS is way more fun.

  • blackstrat@lemmy.fwgx.uk
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    All I year about from the linux community is NixOS and btrfs, neither of which I have any interest in. It almost feels like someone with an agenda is promoting these two with how prevelant they are.

    • 80KiloMett@discuss.tchncs.de
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      I like using btrfs with Arch because of the snapshots. If an update breaks something I can just boot into a snapshot from grub keep using my PC and solve the problem later. It’s very useful… yes… very… you should try it… come… try btrfs… it’s warm and cozy… INSTALL IT!

      • blackstrat@lemmy.fwgx.uk
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        I have tried btrfs in the past and when it goes wrong you are utterly shafted. You can’t even mount it as a read only file system, it will just lock you out entirely. And the support isn’t great, I ended up finding something that had a disclaimer along the lines of “only run this if you really know what you’re doing”, but obviously I didn’t as the documentation didn’t tell me enough to know. So the only people who could possibly know are the developers of the file system themselves. Anyway, I was 2 days in to trying to recover my data by this point so I gave it a go, nothing to lose - it refused to do anything. Great.

        So in summary I’m not going to try it again.

        • chayleaf@lemmy.ml
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          11 months ago

          can confirm, I’ve recently had my btrfs partition on NixOS go permanently read-only because it ran out of metadata space (which you can’t extend without write access, even though btrfs does reserve 0.5GB of metadata space) so I’ve switched to bcachefs

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

      To get it out of the way first: There are no financial issues. There are more than enough funds to continue operations as they are for a sufficiently long time.

      What is actually happening is that a long time sponsor has indicated that they (understandably) no longer want to foot the huge bill of hosting the entire archive of binary caches ($9000/mo). Finding a more sustainable setup is what the community is currently concerned with.
      There is no risk of operations shutting down any time soon, the NixOS foundation has funds set aside to continue even this unsustainable setup for at least a year. We just want to be more efficient with our and others resources going forwards.

      That’s what all this you might have heard of is about.

      Btw, even if the binary cache were to go poof, we don’t technically need it. NixOS is a source-based distro like Gentoo and source hosting is not a concern. The binary cache is immensely helpful though which is why we’d obviously prefer to keep it.

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

          Yes, AWS gracefully sponsored 12 months of our S3 bill which gives us even more time to enact change.

          That’s just the short term resolution though, the Nix community is still looking into more sustainable long-term solutions.

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

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

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

              Thinking about this further…

              I can purchase 10GE fiber, at home, for $299/mo.

              I can purchase a solid 16 bay Supermixro server for around $5k

              16TB drives are $168. There’s $3,700 left so let’s buy 21 drives (336TB, 235TB usable under raidz3 zfs). We’ll leave that last $170 for … electricity.

              Leasing all of this from a regular hosting provider woul be much more cost effective. I work for one, what the heck are you doing man?

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

                You aren’t a reputable public hoster with AWS-class uptime. That has a price too. AWS is likely overpriced though, hence the nix community still looking for better alternatives.

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

              the Nix community is still looking into more sustainable long-term solutions.

  • le_saucisson_masque@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    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.

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

    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

    • Chobbes@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      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.

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

      you have to have a lot of linux/programming knowledge to do even the simplest things like installing/updating your software

      So, pretty much like any other distro

        • RosalynKirk@kbin.social
          link
          fedilink
          arrow-up
          0
          arrow-down
          1
          ·
          1 year ago

          Weird, every distro I’ve tried either has no management, or doesn’t work. Just spins around loading. “Uninstalling” packages does nothing but remove them from the package manager.