dotfiles-guix/modules/home-services/virtualization.scm
2023-09-06 12:39:00 -04:00

39 lines
1.3 KiB
Scheme

(define-module (home-services virtualization)
#:use-module (guix packages)
#:use-module (gnu packages)
#:use-module (gnu packages virtualization)
#:use-module (gnu packages firmware)
#:use-module (gnu services)
#:use-module (gnu services configuration)
#:use-module (gnu services virtualization)
#:use-module (gnu home services)
#:use-module (guix gexp))
(define libvirt-new
(package
(inherit libvirt)
(inputs
(modify-inputs (package-inputs libvirt)
(append ovmf)))))
(define (ovmf-special-files config)
`(("/usr/share/OVMF/OVMF_CODE.fd",
(file-append ovmf "/share/firmware/ovmf_x64.bin"))))
(define-public libvirt-service-type-new
(service-type
(name 'libvirt-new)
(extensions
(list
(service-extension libvirt-service-type
(lambda (config)
(libvirt-configuration
(libvirt libvirt-new)
(unix-sock-group "libvirt")))
)
(service-extension special-files-service-type
ovmf-special-files)
))
(default-value #f)
(description "Libvirt with OVMF")))