Unofficial Hacker News companion — get notified on comment replies, and more.

NixOS 26.11 (opens external site)

312 points by lostmsu 4 hours ago nixos.org 134 comments (opens Hacker News) Vote (opens Hacker News)

View full thread · View on Hacker News

Comment thread (8)

  1. NixOS is also the most tinker-able OS out there. You can quickly have your AI agent make a patch for any operating system component that you want, and automatically rebuild that component and everything that depends on it.

    In many cases I've been able to fix the bugs that I run across, submit the fixes upstream, and have the same fix running on my system simultaneously without worrying about out-of-date packages or what the software's release schedule is.

    Replies (2)
    1. This what I love about. Absolutely trivial to patch existing packages, add your own, even override the one from nixpkgs.
    2. Isn't this possible on any Linux distro? Fetch the source package, patch it, rebuild, install?
      Replies (5)
      1. Yeah, but you don’t have to do anything when upstream updates, provided your patch still applies. You continue getting updates normally.
      2. Possible, yes. Easy, no.

        For example on most distros an updated package will supersede your rebuilt one and you'd need to build it again manually. On NixOS, it will rebuild your with your patch automatically.

      3. In particular, Gentoo makes it really easy to patch packages you install. It's one of the ways in which the source-based nature really gives you a lot of power.
      4. Of course, though maintaining a bunch of these is hell unless it's automated. Nix does exactly that, it automates what should be automated.
      5. The difference is in what "install" means. With most install methods, you're just blasting bits onto a disk and the connection between those bits, the package that created them, and their dependencies, is maybe tracked in a database. A database that can be inconsistent. And uninstalling things doesn't necessarily restore everything to the state that it was in before the install. This is deeply unsatisfying once you've seen how it can be.

        As an example, you can install app A that depends on packages P and Q and then uninstall A, but P and Q won't necessarily be uninstalled. Or you can also have app B that depends on a different version of P and there's a conflict. This completely goes away with nix because a thing and its dependencies are represented as a completely standalone closure, and the state of your machine is just the sum of all the closures you want. It's trivial to go back to the set of closures you had 30 seconds ago if you didn't like the result of the change you just made.

        It's truly magical.