Commit Graph

20 Commits

Author SHA1 Message Date
Martin Wimpress 0742312aa5 build(packaging): sync Nix flakes, devshell and Debian packaging
- Update flake.nix and package.nix to refresh package definitions and
pins
- Refresh devshell.nix to include updated development dependencies
- Adjust debian/control metadata to match packaging and dependency
changes
- Align packaging metadata between Nix and Debian to improve
reproducibility

Signed-off-by: Martin Wimpress <martin@wimpress.org>
2026-01-25 01:51:53 +00:00
Martin Wimpress ea1fbf6932 build(devshell): remove macOS brew and SHARE_PATH sed substitutions
- Remove sed expressions that replaced local SHARE_PATH and removed
Homebrew check
- Rely on existing darwin-specific substitutions and Nix-provided qemu
paths
- Simplify shellHook and avoid accidental replacements on non-Darwin
systems

Signed-off-by: Martin Wimpress <martin@wimpress.org>
2026-01-24 21:28:59 +00:00
Martin Wimpress 6e0b4981ce feat(quickemu): add ARM64 (aarch64) guest support
- Allow arch override via config (arch="${arch:-x86_64}") and set
  ARCH_VM accordingly so aarch64 VMs can be selected from configs.
- Re-detect qemu-system-${ARCH_VM} after sourcing the VM config and
  fail fast with a clear error if the appropriate QEMU binary is
  missing (e.g. qemu-system-aarch64).
- Use virt machine for ARM64 and enable highmem when required
  (MACHINE_TYPE="virt,highmem=on,pflash0=rom,pflash1=efivars").
  pflash0/pflash1 reference named blockdev nodes instead of -drive if
  using OVMF-style pflash on x86.
- Set CPU selection for ARM64 to "max" when available; fall back to
  TCG accel when cross-arch emulation is required (ensures guests
  boot on non-ARM hosts).
- Omit x86-only machine options (smm, vmport) for aarch64 builds to
  avoid passing unsupported flags to QEMU.
- Add AAVMF/ARM64 firmware search paths and keep OVMF logic for
  x86_64 (preserve existing secureboot behaviour for x86 guests).
- Use virtio-gpu-pci for ARM64 (no VGA/virtio-vga on ARM) and add a
  ramfb device to provide an early UEFI framebuffer on ARM64 UEFI
  boot.
- Use virtio-scsi for CD-ROM on ARM64 (virt has no IDE controller) and
  set CD-ROM bootindex=1 so ISO boots before disk when provided.
  Set disk bootindex=2 when an ISO is present so disk remains second.
- Implement EFI boot configuration for ARM64 using -blockdev with
  named nodes (pflash handled via blockdev) rather than the x86
  -drive/secure global approach which is SMM/x86-specific.
- Use the ARM-compatible TPM device (tpm-tis-device) for aarch64
  instead of the x86 tpm-tis device where appropriate.
- Fix EFI_CODE condition bug by using -z instead of -n when checking
  for empty variables (pre-existing bug surfaced while testing ARM64).

IMPACT:
- Enables running aarch64 guests with proper firmware, machine type,
  devices and boot order on both native ARM hosts and non-ARM hosts
  (via TCG emulation).
- Maintainers should note the different pflash/blockdev handling and
  that -global secure pflash settings used for x86 must NOT be used
  for ARM64 virt machines.

Signed-off-by: Martin Wimpress <martin@wimpress.org>
2026-01-24 18:03:24 +00:00
Martin Wimpress 1783381e29 feat(quickget): integrate OpenCore into macOS disk image by default
Create macOS VMs with OpenCore embedded in the EFI partition of disk.qcow2
instead of using a separate OpenCore.qcow2 file. This simplifies VM management
by reducing from two disk images to one.

Implementation:
- Add create_macos_disk_with_opencore() using mtools/sgdisk for cross-platform
  EFI partition creation without mounting or root privileges
- Add download_opencore() to extract OpenCore files from OSX-KVM image
- Use LC_ALL='' with mcopy to prevent FAT directory name mangling
- Adjust disk size threshold for macOS integrated mode (1GB vs 1.5MB)

Backwards compatibility:
- If OpenCore.qcow2 exists, use legacy two-disk boot method
- If mtools/sgdisk unavailable, fall back to legacy method automatically

New dependencies: mtools, gptfdisk (added to devshell.nix and package.nix)

Closes #1720
2026-01-24 12:42:51 +00:00
Martin Wimpress 81143afaab fix(devshell): enable EFI boot on macOS by patching OVMF paths
Nix's qemu_full bundles EDK2 firmware with different filenames than
quickemu expects. Add darwin-specific sed patterns to:
- Set SHARE_PATH to qemu_full's share directory
- Prepend correct firmware paths (edk2-x86_64-code.fd, edk2-i386-vars.fd)
  to the ovmfs search array
2026-01-24 10:02:16 +00:00
Martin Wimpress 5cd0149f3a
chore(deps): update flake, devshell and package Nix files
- Refresh flake.nix inputs and pins to align with current upstream
- Update devshell.nix to use revised development environment packages
- Adjust package.nix to match dependency and tooling changes from the
flake update
- Keep reproducible builds and developer tooling current

Signed-off-by: Martin Wimpress <martin@wimpress.org>
2026-01-23 13:10:55 +00:00
Marin efb71ecdcb s/glxinfo/mesa-demos
The nix package was renamed, but binary stays the same
2026-01-23 07:50:06 +00:00
Martin Wimpress e92fbe95a2 chore: remove ncurses from nix package and devshell 2024-07-02 14:09:29 +01:00
Martin Wimpress 66dfa6451a fix: patch samba detection in Nix flake 2024-07-02 13:13:25 +01:00
Martin Wimpress faccbae06a refactor: update devshell.nix so a usable "fake" quickemu is created
`direnv reload` create a monkey patched `.direnv/bin/quickemu` so testing `quickemu` with secure boot is possible.
2024-06-27 00:44:24 +01:00
Martin Wimpress f4c362eda7 refactor: update flake to, mostly, work on macOS 2024-06-24 08:32:19 +01:00
Martin Wimpress d01011a39c fix: correct syntax error in devshell.nix 2024-05-12 11:11:15 +01:00
Martin Wimpress 4dab035d46 fix(nix): add missing gawk 2024-05-10 02:21:18 +01:00
Martin Wimpress 16e8115e77 fix(quickemu): detect GLSL version and enable GL accordingly. close #920 2024-05-10 01:48:52 +01:00
Phil Clifford da01bdf27d
fix: add pciutils dependency (#1186)
* fix: add pciutils dependency

required for quickreport
Todo: add to docs and nix

* fix: add pciutils dependecy to nix

* docs: document pciutils dependency

* chore:deconflict submodule
2024-05-10 00:20:15 +01:00
Martin Wimpress 391d00eaf4 chore: drop lsb_release from NIx devshell and package 2024-05-05 12:48:54 +01:00
Martin Wimpress 49943967a3
fix: remove commas from nativeBuildInputs 2024-05-02 17:12:19 +01:00
Martin Wimpress 5290be956b style: sort packages in .nix files 2024-05-02 17:07:02 +01:00
Martin Wimpress b1f9de6ef1 fix: add ncurses to devshell.nix and package.nix 2024-05-02 17:07:02 +01:00
Martin Wimpress f3fff84952 feat: add devshell.nix 2024-05-02 17:07:02 +01:00