2023-12-02 21:02:28 -07:00
|
|
|
GUIX_SUBSTITUTE_FLAG
|
|
|
|
=
|
|
|
|
--substitute-urls='https://ci.guix.gnu.org
|
|
|
|
https://substitutes.nonguix.org'
|
|
|
|
GUIX_LIB_FLAGS
|
|
|
|
?=
|
|
|
|
-L
|
|
|
|
./
|
|
|
|
LIBVIRT_GROUP
|
|
|
|
?=
|
|
|
|
libvirt
|
|
|
|
LIBVIRT_USER
|
|
|
|
?=
|
|
|
|
$
|
|
|
|
(USER)
|
|
|
|
GUIX_IMAGE_CMD
|
|
|
|
?=
|
|
|
|
guix
|
|
|
|
system
|
|
|
|
image
|
|
|
|
$
|
|
|
|
(GUIX_SUBSTITUTE_FLAG)
|
|
|
|
--image-type=qcow2
|
|
|
|
$
|
|
|
|
(GUIX_LIB_FLAGS)
|
2023-11-30 14:40:07 -07:00
|
|
|
|
2023-12-02 21:02:28 -07:00
|
|
|
VM_RAM
|
|
|
|
?=
|
|
|
|
4000
|
|
|
|
VM_CPU
|
|
|
|
?=
|
|
|
|
4
|
2023-11-22 12:26:17 -07:00
|
|
|
|
2023-12-02 21:02:28 -07:00
|
|
|
%.qcow2:
|
|
|
|
%.scm
|
|
|
|
$
|
|
|
|
(eval RO := $
|
|
|
|
(shell $
|
|
|
|
(GUIX_IMAGE_CMD) $<))
|
|
|
|
install
|
|
|
|
-C
|
|
|
|
-m
|
|
|
|
666
|
|
|
|
-o
|
|
|
|
$
|
|
|
|
(LIBVIRT_USER)
|
|
|
|
-g
|
|
|
|
$
|
|
|
|
(LIBVIRT_GROUP)
|
|
|
|
$
|
|
|
|
(RO)
|
|
|
|
$@
|
2023-12-01 01:27:39 -07:00
|
|
|
|
2023-12-02 21:02:28 -07:00
|
|
|
%:
|
|
|
|
%.qcow2
|
|
|
|
$
|
|
|
|
(eval OVMF := $
|
|
|
|
(shell guix build $
|
|
|
|
(GUIX_SUBSTITUTE_FLAG) ovmf))
|
|
|
|
qemu-system-x86_64
|
|
|
|
-nic
|
|
|
|
user,model=virtio-net-pci
|
|
|
|
-enable-kvm
|
|
|
|
-hda
|
|
|
|
$<
|
|
|
|
-m
|
|
|
|
$
|
|
|
|
(VM_RAM)
|
|
|
|
-smp
|
|
|
|
$
|
|
|
|
(VM_CPU)
|
|
|
|
-bios
|
|
|
|
$
|
|
|
|
(OVMF)
|
|
|
|
/share/firmware/ovmf_x64.bin
|
2023-11-30 14:40:07 -07:00
|
|
|
|
2023-12-02 21:02:28 -07:00
|
|
|
.PHONY:
|
|
|
|
%
|
|
|
|
%-ro:
|
|
|
|
%.scm
|
|
|
|
$
|
|
|
|
(eval VM_SCRIPT := $
|
|
|
|
(shell guix
|
|
|
|
system
|
|
|
|
$
|
|
|
|
(GUIX_LIB_FLAGS)
|
|
|
|
$
|
|
|
|
(GUIX_SUBSTITUTE_FLAG)
|
|
|
|
vm
|
|
|
|
$<
|
|
|
|
--expose=$
|
|
|
|
(PWD)
|
|
|
|
/pki=/var/lib/openvpn))
|
|
|
|
$
|
|
|
|
(VM_SCRIPT)
|
|
|
|
-m
|
|
|
|
$
|
|
|
|
(VM_RAM)
|
|
|
|
-smp
|
|
|
|
$
|
|
|
|
(VM_CPU)
|
|
|
|
-nic
|
|
|
|
user,model=virtio-net-pci
|