6 comments

  • EnigmaCurry53 minutes ago
    I&#x27;m happy to see this, and I have lots of thoughts about this. Building declarative services on Nix is a far superior way of distributing Linux to VMs than most any other way I&#x27;ve tried. I am working [1] on very similar things, but I&#x27;ve been leaning more on the self-hosted path, my VM template targets libvirt and Proxmox VE with a single CLI api. I even have an experimental branch that targets DigitalOcean. For VMs especially, I want my OS to be immutable. My VMs should contain no state other than my application state. Upgrades should be a full image replacement and reboot.<p>So in my template, I have created the VMs with two disks: first one is for NixOS and is built from an image, and it is read-only. The second is mounted to &#x2F;var and is used for all system configuration as well as application state. If I have multiple VMs, they can all share the same base image (thin provisioned). That&#x27;s the mode that I want for my deployments of services, immutable and as stateless as possible. For agent use, its different, you actually want a mutable NixOS root so that the agent can do what it wants.<p>I built three modes: immutable, semi-mutable, and mutable. mutable removes the read-only lock on the root, and just lets you manage the VM as a pet. semi-mutable adds an ephemeral overlayfs that gets wiped the next time you upgrade the base image. So that gives you kind of the best of both worlds: an immutable read-only base image and the ability to &quot;nix profile add&quot; whatever you (or your agent) wants, but with the contract that these imperatively installed things will disappear the next time you upgrade. Are you planning on adding a LICENSE to your machine0-nixos repo?<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;EnigmaCurry&#x2F;nixos-vm-template" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;EnigmaCurry&#x2F;nixos-vm-template</a>
    • bwm40 minutes ago
      Always happy to meet others that are working with NixOS :) I&#x27;ve just added the License - it&#x27;s MIT.
  • nc59 minutes ago
    I’ve been using machine0 for hosting openclaw and a couple of web apps i’ve been working on. Great product super easy to use with claude code.
    • bwm58 minutes ago
      Been great having you :)
  • setheron1 hour ago
    Big fan of exe.dev so the added Nix seems like a solid value add.<p>exe.dev is great but lurking in my mind is: &quot;how will I replicate this if I ever need to move to AWS etc..&quot; for all the service composition.<p>Site looks great too
    • bwm1 hour ago
      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&#x27;re guaranteed exactly the same build.
  • JeanEdern1 hour ago
    How does machine0 handle NixOS state drift and recovery in practice—for example, if a VM is manually modified outside the flake, can I detect or reset that drift, and how do snapshots interact with flake-based provisioning?
    • bwm26 minutes ago
      It&#x27;s not possible to modify the VM outside of the flake :)
  • n3mo-dev38 minutes ago
    Great product, with great explanation
    • bwm38 minutes ago
      Thank you!
  • dizhn1 hour ago
    [flagged]