vmix.nix/lib/images/windows/templates/essentials/virtio-drivers.nix
Git Sagar ebfb10b3b3 vmix run command, virtio-drivers template, delay-oobe-run flag
CLI:
- `vmix run <qcow2>` boots image with QEMU (SDL if DISPLAY, snapshot mode)
- --generalize supports delay-oobe-run=true to defer OOBE + activation
  to first boot on real hardware (for physical disk deployments)

Templates:
- essentials.virtioDrivers: installs VirtIO drivers only (no guest agent)
  used in laptop bundle for network access during Office download
- generalize: delayOobeRun flag controls sysprep /shutdown vs /reboot
  delays OOBE, user creation and HWID activation to target device

Build:
- suppress XDG_RUNTIME_DIR and homeless-shelter warnings in SDL mode
- remove invalid ICH9-LMB global properties

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-23 23:06:28 -03:00

18 lines
699 B
Nix

# Install VirtIO drivers only (no guest agent or SPICE)
# Used during build for network access, not needed on real hardware
{ drivers, ... }:
{
name = "virtio-drv";
cdroms = [ drivers.virtio-iso ];
auditScript = ''
@echo off
if exist D:\cert\virtio_win_cert.cer (
certutil -addstore TrustedPublisher D:\cert\virtio_win_cert.cer
)
:: Install drivers via pnputil (network, storage, balloon, serial)
for %%d in (NetKVM vioinput viostor vioscsi Balloon vioserial) do (
if exist "D:\%%d\w10\amd64" pnputil /add-driver "D:\%%d\w10\amd64\*.inf" /install 2>nul
if exist "D:\%%d\w11\amd64" pnputil /add-driver "D:\%%d\w11\amd64\*.inf" /install 2>nul
)
'';
}