feat(fw): qemu-vm os option (ubuntu|nixos) — clean NixOS image, drop infect for dev #167

Merged
dominik.polakovics merged 1 commit from feat/qemu-vm-nixos-os into main 2026-06-15 00:03:57 +02:00

Adds an os = "ubuntu" | "nixos" option to cloonar.vms.<name>, so a guest can be provisioned as a clean NixOS instead of Ubuntu + nixos-infect. Default is ubuntu (openclaw unchanged).

Why: infecting the Ubuntu cloud image in place left the dev VM with a broken boot layout — a phantom ESP boot.mount, dbus-broker failing 226/NAMESPACE, and mkdir /boot/grub: No such device on every switch (see #161 thread). In-place conversion of a cloud image is too fragile.

os = "nixos": the init builds a minimal NixOS qcow with nixpkgs' make-disk-image on a legacy MBR / BIOS-GRUB partition layout (no GPT/ESP → none of the dead-/boot breakage), carrying only sshd + root login with sshKeys + static MAC-matched networking. It's a seed: boots clean, you SSH in and onboard (re-key + bento → hosts/dev). The qemu runner is unchanged; the cloud-init seed ISO is skipped for NixOS. The image derivation is generic (not hosts/dev) and lazily evaluated, so it doesn't re-couple fw and only os = "nixos" guests build it.

Also: lifted sshKeys to a top-level option (both OSes use it); cloudInit.{packages,runcmd,writeFiles} stay ubuntu-only. Flipped dev-temp to os = "nixos".

This supersedes the nixos-infect step in PR2 — ADR-0018's provisioning section should be amended (follow-up).

Pre-commit dry-build green for all hosts (the seed-image derivation evaluates; the qcow builds on fw at deploy).

Part of #161.

Adds an `os = "ubuntu" | "nixos"` option to `cloonar.vms.<name>`, so a guest can be provisioned as a clean NixOS instead of Ubuntu + `nixos-infect`. Default is `ubuntu` (openclaw unchanged). **Why:** infecting the Ubuntu cloud image in place left the dev VM with a broken boot layout — a phantom ESP `boot.mount`, `dbus-broker` failing `226/NAMESPACE`, and `mkdir /boot/grub: No such device` on every switch (see #161 thread). In-place conversion of a cloud image is too fragile. **`os = "nixos"`:** the init builds a minimal NixOS qcow with nixpkgs' `make-disk-image` on a **legacy MBR / BIOS-GRUB** partition layout (no GPT/ESP → none of the dead-`/boot` breakage), carrying only `sshd` + root login with `sshKeys` + static MAC-matched networking. It's a seed: boots clean, you SSH in and onboard (re-key + bento → `hosts/dev`). The qemu runner is unchanged; the cloud-init seed ISO is skipped for NixOS. The image derivation is generic (not `hosts/dev`) and lazily evaluated, so it doesn't re-couple fw and only `os = "nixos"` guests build it. **Also:** lifted `sshKeys` to a top-level option (both OSes use it); `cloudInit.{packages,runcmd,writeFiles}` stay ubuntu-only. Flipped `dev-temp` to `os = "nixos"`. This supersedes the `nixos-infect` step in PR2 — ADR-0018's provisioning section should be amended (follow-up). Pre-commit dry-build green for all hosts (the seed-image derivation evaluates; the qcow builds on fw at deploy). Part of #161.
dominik.polakovics deleted branch feat/qemu-vm-nixos-os 2026-06-15 00:03:57 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Cloonar/nixos!167
No description provided.