fuck libvirt fuck libvirt fuck libvirt fuck libvirt fuck libvirt

This commit is contained in:
Freya Murphy 2023-09-06 22:23:01 -04:00
parent 426df5d509
commit f1b0bfd81f
No known key found for this signature in database
GPG key ID: 988032A5638EE799
4 changed files with 58 additions and 12 deletions

View file

@ -24,6 +24,7 @@
#:use-module (gnu services authentication)
#:use-module (gnu services virtualization)
#:use-module (home-packages wm)
#:use-module (home-packages virtualization)
#:use-module (home-services virtualization))
(define %my-base-packages
@ -76,7 +77,7 @@
"nss-certs"
"gvfs"
"gnupg"
"virt-manager"
;; "virt-manager"
"light"
"waybar"
"avahi"
@ -100,7 +101,7 @@
"wireshark"
"zsh"
"neovim"))
(list swaylock-effects-new)
(list swaylock-effects-new virt-manager-new)
%my-base-packages))
;; Below is the list of system services. TO search for available

View file

@ -0,0 +1,25 @@
(define-module (home-packages firmware)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages package-management)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages virtualization)
#:use-module (gnu packages firmware)
#:use-module (guix gexp))
(define-public ovmf-new
(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)
)))
))))))

View file

@ -0,0 +1,28 @@
(define-module (home-packages virtualization)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages package-management)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages virtualization)
#:use-module (gnu packages firmware)
#:use-module (home-packages firmware)
#:use-module (guix gexp))
(define-public virt-manager-new
(package
(inherit virt-manager)
(name "virt-manager-new")
(arguments
(substitute-keyword-arguments (package-arguments virt-manager)
((#:phases phases)
#~(modify-phases #$phases
(add-after 'install 'ovmf
(lambda _
(let ((fmw (string-append #$output "/usr/share/OVMF")))
(mkdir-p fmw)
(copy-recursively #$(file-append ovmf-new "/share/firmware") fmw)
(mkdir-p fmw)
(copy-recursively "Build/OvmfX64/RELEASE_GCC49/FV" fmw)
)))
))))))

View file

@ -2,11 +2,11 @@
#: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 (home-packages firmware)
#:use-module (guix gexp))
(define libvirt-new
@ -14,11 +14,7 @@
(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"))))
(append ovmf-new)))))
(define-public libvirt-service-type-new
(service-type
@ -28,12 +24,8 @@
(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")))