2023-11-22 12:26:17 -07:00
|
|
|
NONGUIX_DIR ?= ~/Code/nonguix
|
2023-11-27 11:26:54 -07:00
|
|
|
GUIX_IMAGE_CMD ?= guix system image --substitute-urls='https://bordeaux.guix.gnu.org' --image-type=qcow2 -L ./ -L $(NONGUIX_DIR)
|
2023-11-22 12:26:17 -07:00
|
|
|
LIBVIRT_GROUP ?= libvirt
|
|
|
|
|
|
|
|
machines/%.qcow2: machines/%.scm
|
|
|
|
$(eval RO := $(shell $(GUIX_IMAGE_CMD) $<))
|
|
|
|
install -C -m 666 -o $(USER) -g $(LIBVIRT_GROUP) $(RO) $@
|
|
|
|
|
|
|
|
VM_RAM ?= 4000
|
|
|
|
VM_CPU ?= 4
|
|
|
|
|
|
|
|
.PHONY: machines/%
|
|
|
|
machines/%: machines/%.qcow2
|
2023-11-27 11:26:54 -07:00
|
|
|
$(eval OVMF := $(shell guix build --substitute-urls='https://bordeaux.guix.gnu.org' ovmf))
|
2023-11-24 11:36:43 -07:00
|
|
|
qemu-system-x86_64 -nic bridge,br=virbr0 -enable-kvm -hda $< -m $(VM_RAM) -smp $(VM_CPU) -bios $(OVMF)/share/firmware/ovmf_x64.bin
|