16

Show HN: machine0 – Persistent NixOS VMs You Control from the CLI

Hi HN! Excited to launch machine0, a CLI that makes it easy to create, provision and snapshot persistent NixOS (& Ubuntu) VMs.

You can think of machine0 as a modern VPS provider. VMs stay on unless switched-off (with 99.99% uptime), they have static IPs and HTTPS endpoints, 1-60 vCPU, up to 240GB RAM and optionally GPUs. The CLI provides commands to manage lifecycle, snapshots and also provision the VMs using Nix flakes or Ansible playbooks. VMs are priced by the minute of usage.

What makes machine0 unique is that it has first class support for NixOS! In a nutshell, NixOS lets you define your entire OS as code (think Terraform but for your Linux). A flake declares your system state (packages, services, firewall rules, users...) and pins all dependencies via a lockfile. Given the same flake.nix and flake.lock, `nixos-rebuild switch` always produces the exact same system.

The NixOS ecosystem is mature, and flakes are expressive: at the system level you can define packages, what's in /etc, firewall rules, users & groups etc. At the user level, you can define your shell, aliases, tmux and vim config. Having your entire environment defined as code makes it easy to audit what's installed and how things are set up. You can rollback by reverting the last commit. And agents can write the code for you and test it against disposable machine0 VMs.

If you'd like to dive right in, these commands will get you started:

  npm install -g @machine0/cli
  machine0 new my-vm --image nixos-25-11        # create a new nixos VM
  machine0 provision my-vm ./flake#my-profile   # provision it using a nix flake
  machine0 ssh my-vm                            # ssh in
  machine0 stop my-vm                           # stop the VM
  machine0 images new my-vm my-snapshot         # create a snapshot
  machine0 new my-clone --image my-snapshot     # create a new VM from the snapshot
- Demo of installation + NixOS provisioning via Claude Code: https://www.youtube.com/watch?v=RT8N0_e3Vfg

- Documentation: https://docs.machine0.io/introduction/overview

- machine0 NixOS flakes: https://github.com/fdmtl/machine0-nixos

If you're in the habit of using VMs, or want to know what the NixOS fuss is about, would love for you to give machine0 a try!

Big fan of exe.dev so the added Nix seems like a solid value add.

exe.dev is great but lurking in my mind is: "how will I replicate this if I ever need to move to AWS etc.." for all the service composition.

Site looks great too

25 minutes agosetheron

Thanks! Yup, one of the benefits of defining your VMs as code using Nix, is that you can take that code to any supplier, and you're guaranteed exactly the same build.

23 minutes agobwm

[flagged]

14 minutes agodizhn

[flagged]