libvirt works libvirt works libvirt works

This commit is contained in:
Ryan 2023-09-07 16:29:27 -04:00
parent 43ea80ea90
commit c8b287a7c7
Signed by: ryan77627
GPG key ID: 81B0E222A3E2308E
2 changed files with 28 additions and 32 deletions

View file

@ -170,7 +170,7 @@
(service nix-service-type) (service nix-service-type)
(service libvirt-service-type (service libvirt-service-type
(libvirt-configuration (libvirt-configuration
(libvirt libvirt-new) (libvirt libvirt-ovmf)
(unix-sock-group "libvirt"))) (unix-sock-group "libvirt")))
(service virtlog-service-type) (service virtlog-service-type)
(service bluetooth-service-type) (service bluetooth-service-type)

View file

@ -10,40 +10,36 @@
#:use-module (gnu packages firmware) #:use-module (gnu packages firmware)
#:use-module (guix gexp)) #:use-module (guix gexp))
(define ovmf-new (define-public libvirt-ovmf
(package
(inherit ovmf)
(name "ovmf-new")
(arguments
(substitute-keyword-arguments (package-arguments ovmf)
((#:phases phases)
#~(modify-phases #$phases
(replace 'install
(lambda _
(let ((fmw (string-append #$output "/share/firmware")))
(mkdir-p fmw)
(copy-recursively "Build/OvmfX64/RELEASE_GCC49/FV" fmw))))))))))
(define-public libvirt-new
(package (package
(inherit libvirt) (inherit libvirt)
(name "libvirt-new") (name "libvirt-ovmf")
(inputs (inputs
(modify-inputs (package-inputs libvirt) (modify-inputs (package-inputs libvirt)
(append ovmf-new))))) (append qemu)))
(arguments
(substitute-keyword-arguments (package-arguments libvirt)
((#:phases phases)
#~(modify-phases #$phases
(add-after 'install 'install-firmware
(lambda _
(let ((fmw (string-append #$output "/share/qemu")))
(mkdir-p fmw)
(copy-recursively #$(file-append qemu "/share/qemu") fmw))))))))))
(define-public virt-manager-ovmf (define-public virt-manager-ovmf
(package (package
(inherit virt-manager) (inherit virt-manager)
(name "virt-manager-ovmf") (name "virt-manager-ovmf")
(inputs
(modify-inputs (package-inputs virt-manager)
(append qemu)))
(arguments (arguments
(substitute-keyword-arguments (package-arguments virt-manager) (substitute-keyword-arguments (package-arguments virt-manager)
((#:phases phases) ((#:phases phases)
#~(modify-phases #$phases #~(modify-phases #$phases
(add-after 'install 'ovmf (add-after 'install 'install-firmware
(lambda _ (lambda _
(let ((fmw (string-append #$output "/usr/share/OVMF"))) (let ((fmw (string-append #$output "/share/qemu")))
(mkdir-p fmw) (mkdir-p fmw)
(copy-recursively #$(file-append ovmf-new "/share/firmware") fmw) (copy-recursively #$(file-append qemu "/share/firmware") fmw))))))))))
;(mkdir-p fmw)
(copy-recursively "Build/OvmfX64/RELEASE_GCC49/FV" fmw))))))))))