Skip to main content

images ls


images get


images new

Snapshot a VM into a reusable image. The VM is stopped automatically before snapshotting.

Building from a git repo

With --git-repo, images new builds a NixOS image server-side from a public GitHub repo’s nix flake instead of snapshotting a VM. The branch is resolved to its latest commit at submit time and the commit is recorded on the image version.
How it works: a temporary builder VM named m0-build-* boots from the NixOS base image, applies nixos-rebuild switch --flake github:<owner>/<repo>/<commit>#<profile>, is snapshotted, and destroyed. The builder is visible in machine0 ls and bills like a normal machine for the duration of the build (typically 10–40 minutes). A brand-new image name is published immediately on success; building onto an existing image creates a draft version to test and promote, same as a snapshot save. If the build fails, the error (including the tail of the nixos-rebuild log) is recorded on the image version — see it with machine0 images versions get <image> <version> — and re-running the same command retries against the branch’s latest commit. Limitations (v1): public GitHub.com repositories only; no git submodules or LFS (the flake is fetched as a tarball); the profile must import the machine0-nixos base modules (keep the nix user and SSH enabled), or the build fails verification.

images update


images rm

Deleting the auto-saved snapshot of a suspended machine (named suspended-<machine>-<date>-<time>) also destroys that machine — the snapshot is its only copy of its disk. Check machine0 ls for suspended machines before removing suspended-* images.