NixOS is, in my opinion, the most AI-ready operating system. It eliminates the fear of letting AI's wreak havoc on your system and render it unbootable, as rollbacks are built-in. Combine it with a good personal file backup system like borg and you're golden. My days of tinkering to get things to work in Linux are over, and that makes me happy.
In the future I can see something like NixOS going mainstream by hiding all the scripting behind "Advanced" settings, and letting users control their OS using AI. I'm actually surprised I haven't seen that implemented yet, as I think it has a lot of potential.
I got heavy into NixOS pre-ai, in like 2020, but I agree, it's an ABSOLUTE joy now. My entire OS is custom built to my workflow, down to every little step. I have custom scripts and services all over the place removing friction. And it's not even chaos! My whole config is logically laid out and I understand every single line, with every module and feature in it's own little spot. And as soon as I notice something about my setup I don't like: I throw an agent at it. If I want to try some software that only lives in github, an agent packages it for me. If I don't like it: abandon the change and rebuild.
I even had an agent build it's own sandbox. It's a systemd container that pulls in most of my host config, but only has access to a couple directories in my real home. There are so many "container/vm for your agent" projects on github: I built my own in an hour. The file is about 100 lines long; that's it.
Every change I make is committed and pushed. I have my OS history going back 6 years. My laptop and servers stay in sync with my setup for free. If I buy a new laptop (maybe someday), setup takes an hour, almost all unattended.
Do you have any comparison to guix? I'm intrigued by the concept, and I think some of guix' choices would appeal better to me, but I'm unsure about the size of the ecosyste,m, I almost never hear about it.
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.
Yup. I run my entire server setup on nixos. Been doing it almost 8 years now. But I recently handed it all over to my agents. Got pxe booting, instant kexec updates with tpm handoffs, etc... so easy!
That's only true for the declarative parts of your system. What if AI decides to delete your photo library and you don't have a backup? Or it deletes your old generations to "save space"?
> Combine it with a good personal file backup system like borg and you're golden
As for old generations, I keep my system flakes in a git repo. Even if they're garbage collected I could checkout the old commit and rebuild if necessary.
Git is the way to go. Again, I think all of this stuff can easily be set up for non-tech people out of the box: backups, git repo, built-in AI agent, perhaps running locally using a small model fine tuned for the OS. All optional.
Use a sandboxing tool that offers restrictions on the filesystem and rollbacks on whatever parts the LLM agent has write access to. I use this one: https://nono.sh/
Hmmm.... In my use cases, ai just writes the nix expressions and simulates my entire data center setup in qemu. It also writes a script to deploy the thing. I do the final deployment
You could restore disk snapshots way before Time Machine, It departments did it all the time. And you could do it from the network, from a CD, from another drive, from...
But NixOS is not that at all, it's not a backup solution. You can't take TimeMachine (or whatever disk snapshot solution you use, even ZFS if you like) and ask it to reinstall your system from clean just like before, but with a different Firefox version (just to set an example). Or to replicate it partially or totally in a container or VM.
I don't even use NixOS (although I do a lot of snapshots), and it's a completely different thing.
It's not about "hacker points", the agent makes complexity nearly invisible (current agents wreck havoc on Nix code quality if left running completely unattended, but that's another question). NixOS gives the agent a devops stack in your machine, "global undo" is just one tiny thing it can do. For example the agent can do something in the background without interrupting you using a shadow branch of the entire operating system. It's extremely flexible, Time Machine and systems with immutable snapshots are incomparable.
I've never once had the desire to restore system state from something like Time Machine. If my OS is hosed, it's hosed and I'm going to reinstall it. NixOS doesn't allow you to get into that state because of its very design. It is far from "worthless."
NixOS isn't experimental. It's older than Time Machine. Linux is also just generally more useful as a desktop environment unless you're specifically invested into the Apple ecosystem.
Thank you to the maintainers! I've been a convert for ~2 years now. The maintainability and reproducibility that the Nix ecosystem provides is unmatched.
That’s crazy; I wonder what the quality and stability of all these packages are. I run NixOS on my homelab and have been generally pretty happy, but I suspect I’m only using very standard, well-worn packages.
I'm not an active maintainer, but nixpkgs definitely has a huge amount of automation going on. Tons of stuff getting slurped in from other package managers, pypi, cargo, etc.
Ryan Mulligan's bot alone is responsible for over 162k PRs in there:
And I believe much of that is actually pre-LLM, just the basic work of "what version have we got, what version has upstream got, okay bump forward and run the test suite, PR"
I am listed as a maintainer of a couple packages. Getting packages into nixpkgs isn’t too hard, and updates are often automated. I have very rarely needed to do anything beyond glance over the auto update PRs.
Yea, i was just discussing this - i'm concerned that Nix's model of git based channels leads in the current day of constant exploits leads to constantly updating the channel (or in my case, my flake lock), and as a result possibly letting in sketchy updates.
I'd feel better about updating my lockfile so frequently if there was some sort of global-min-publish-age like Rust's Cargo has.
Not really sure what the ideal solution is. I just know i'm getting more concerned with each update heh. Especially since so many of us use unstable for some/all packages.
I was more concerned about this before LLMs. Nowadays, I suspect people are using LLMs to monitor nixpkgs commits for malicious changes. (Or rather, I hope people are. It seems like an obvious strategy, but perhaps it's too expensive for any single individual to undertake.)
I expect there are orgs that are paying to at least monitor the stuff in their closures, which with enough such participants should give decent coverage of a common baseline, even if it's patchier at the fringes.
Expectation is: if upstream program version packaged is good, package is good. Majority of derivations just pull from upstream since there's no need to take extra steps to make everything work happy together, i.e. pkg1 can depend on libA_v1 and pkg2 can depend on libA_v2 or libA_v1-but-with-some-patches, without conflict or extra work, due to Nix's design, whereas on regular distros it isn't as simple. Also Nix manages python/ruby/etc packages that on other distros will've been installed by pip/gem/etc.
I mean, NixOS is big on determinism, so when you declare what a package is, you typically have to redefine a deterministic identifier of the dependency, e.g. a sha256. To contrast, I do not think when you update libssl on Ubuntu, it's advertised as updating all the networking-enabled packages on your system. But for NixOS it literally is.
My NixOS concern for homelabs is whether such package rebuilds will destroy the write cycles on my storage. Especially in this market I think I would rather let hyperscalars deal with that kind of problem.
I mean I just use nix, and there's no special god-given reason it has to be "nix", nix just figured out the core algorithm and idea to make it work (innovative, but not anything crazy like Riemann) , and there's a ton of ecosystem backup to make it work.
In the future I can see something like NixOS going mainstream by hiding all the scripting behind "Advanced" settings, and letting users control their OS using AI. I'm actually surprised I haven't seen that implemented yet, as I think it has a lot of potential.
I even had an agent build it's own sandbox. It's a systemd container that pulls in most of my host config, but only has access to a couple directories in my real home. There are so many "container/vm for your agent" projects on github: I built my own in an hour. The file is about 100 lines long; that's it.
Every change I make is committed and pushed. I have my OS history going back 6 years. My laptop and servers stay in sync with my setup for free. If I buy a new laptop (maybe someday), setup takes an hour, almost all unattended.
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.
> Combine it with a good personal file backup system like borg and you're golden
As for old generations, I keep my system flakes in a git repo. Even if they're garbage collected I could checkout the old commit and rebuild if necessary.
However, it is worth noting that Nix has pretty good sandboxing facilities.
Nevertheless, more tooling on this area would be welcome. It is still a bit behind Guix.
Time Machine was a snapshot backup, which if fundamentally different.
I don't have to run an esoteric, experimental OS to achieve the same goal.
It's a net loss of hacker points — like currency of a country that doesn't exist anymore. Both worthless in the real world.
But NixOS is not that at all, it's not a backup solution. You can't take TimeMachine (or whatever disk snapshot solution you use, even ZFS if you like) and ask it to reinstall your system from clean just like before, but with a different Firefox version (just to set an example). Or to replicate it partially or totally in a container or VM.
I don't even use NixOS (although I do a lot of snapshots), and it's a completely different thing.
That’s crazy; I wonder what the quality and stability of all these packages are. I run NixOS on my homelab and have been generally pretty happy, but I suspect I’m only using very standard, well-worn packages.
Ryan Mulligan's bot alone is responsible for over 162k PRs in there:
https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+author%3Ar-...
And I believe much of that is actually pre-LLM, just the basic work of "what version have we got, what version has upstream got, okay bump forward and run the test suite, PR"
I'd feel better about updating my lockfile so frequently if there was some sort of global-min-publish-age like Rust's Cargo has.
Not really sure what the ideal solution is. I just know i'm getting more concerned with each update heh. Especially since so many of us use unstable for some/all packages.
My NixOS concern for homelabs is whether such package rebuilds will destroy the write cycles on my storage. Especially in this market I think I would rather let hyperscalars deal with that kind of problem.
It’s amazing when you’re working with multiple laptops as well, keeping your AGENTS.md in sync along with all your scripts, apps, etc.
Once you’re used to it, not having it seems like chaos.
I love it but I don’t think I would’ve had the time to learn it if not for LLMs.
Right now NixOS is kind of unique in many ways.
I will now put up a challenge, perhaps 1 out of 1000000 may consider it as a claim:
The claim is that no other linux distribution will offer features similar to NixOS in the next three years.
(Hopefully I will be wrong, but the challenge has now been started. See you in three years to check.)