Remix.run Logo
▲ dark-star 3 hours ago

What's the advantage over any other Linux distro in a VM that you can checkpoint, refcopy and boot up in seconds? I'd rather let my AI agent run amok in a VM than on my actual production system

▲Cyph0n 2 hours ago | parent | next [-]

You can also just run NixOS in a VM, which is what I would recommend to try it out.

Heck, you can even build & bake a NixOS VM purely using Nix - no Packer or Ansible (or other tools) required. Funnily enough, I just made a short video about this: https://youtu.be/Pb32C2inVhw.

As for why NixOS vs. another distro, it’s just amazing to be able to declaratively specify the state of your system and “build” that specification with some level of confidence that it will boot and it will work. And if it doesn’t work, you can atomically roll it back without having to solely rely on external (VM or filesystem) snapshots.

▲CrimsonCape 31 minutes ago | parent | prev | next [-]

One thing nobody mentioned yet is the Nix store; if you are unaware, every part of the system configuration you run is contained in the store; its a dedicated read-only file system that contains every software package managed by Nix. Once your system installation is switched-to, plain users do not have write permission in the store. So long as your agents are working in user land, they can't touch installed software. It's a lot of mental energy you don't have to spend worrying about where the LLM has been and what is has been doing.

▲charcircuit 28 minutes ago | parent [-]

The LLM lives in the VM. We already know where it is. The code AI is writing and running is not going to be in the store anyways so it doesn't help as much as you say.

▲gf000 3 hours ago | parent | prev | next [-]

You describe declaratively your whole system.

I have a single nix config repo that can build my home server, home PC and remote server all. They have a small shared part (terminal user settings etc), but it also sets up stuff like systemd services etc.

Like the whole *arr+jellyfin (download media) setup is just a couple of lines and it just works.

▲drdexebtjl 3 hours ago | parent | prev [-]

So run NixOS in a VM. The advantage is that when the agent does make some (useful) change to the system that you want to keep, the change will be reproducible so you can apply it on your clean checkpoint. On a traditional distro, you would have to checkpoint after the agent made the change, including not only the change, but all the state leading up to the change.

▲throooooo 2 hours ago | parent [-]

That's a great point. I install things and configure things for random needs all the time. If I change my mind in a week or two it's easy to revert the commit. Snapshotting a VM doesn't come close.