diff options
| author | Ryan Schanzenbacher <ryan@rschanz.org> | 2023-09-07 16:29:27 -0400 |
|---|---|---|
| committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2023-09-07 16:29:27 -0400 |
| commit | c8b287a7c774bacdfeb35279680c7b1a2524a4b8 (patch) | |
| tree | 7dcda62ea5cdef32a15e82e064683f79273ec36f | |
| parent | 43ea80ea908a4c7070e09f70d4fc63acd34cdace (diff) | |
libvirt works libvirt works libvirt works
| -rw-r--r-- | modules/ryan-config/base-system.scm | 2 | ||||
| -rw-r--r-- | modules/ryan-packages/virtualization.scm | 58 |
2 files changed, 28 insertions, 32 deletions
diff --git a/modules/ryan-config/base-system.scm b/modules/ryan-config/base-system.scm index 4f75686..ba4e3b3 100644 --- a/modules/ryan-config/base-system.scm +++ b/modules/ryan-config/base-system.scm | |||
| @@ -170,7 +170,7 @@ | |||
| 170 | (service nix-service-type) | 170 | (service nix-service-type) |
| 171 | (service libvirt-service-type | 171 | (service libvirt-service-type |
| 172 | (libvirt-configuration | 172 | (libvirt-configuration |
| 173 | (libvirt libvirt-new) | 173 | (libvirt libvirt-ovmf) |
| 174 | (unix-sock-group "libvirt"))) | 174 | (unix-sock-group "libvirt"))) |
| 175 | (service virtlog-service-type) | 175 | (service virtlog-service-type) |
| 176 | (service bluetooth-service-type) | 176 | (service bluetooth-service-type) |
diff --git a/modules/ryan-packages/virtualization.scm b/modules/ryan-packages/virtualization.scm index d43a337..d59ad2e 100644 --- a/modules/ryan-packages/virtualization.scm +++ b/modules/ryan-packages/virtualization.scm | |||
| @@ -10,40 +10,36 @@ | |||
| 10 | #:use-module (gnu packages firmware) | 10 | #:use-module (gnu packages firmware) |
| 11 | #:use-module (guix gexp)) | 11 | #:use-module (guix gexp)) |
| 12 | 12 | ||
| 13 | (define ovmf-new | 13 | (define-public libvirt-ovmf |
| 14 | (package | ||
| 15 | (inherit ovmf) | ||
| 16 | (name "ovmf-new") | ||
| 17 | (arguments | ||
| 18 | (substitute-keyword-arguments (package-arguments ovmf) | ||
| 19 | ((#:phases phases) | ||
| 20 | #~(modify-phases #$phases | ||
| 21 | (replace 'install | ||
| 22 | (lambda _ | ||
| 23 | (let ((fmw (string-append #$output "/share/firmware"))) | ||
| 24 | (mkdir-p fmw) | ||
| 25 | (copy-recursively "Build/OvmfX64/RELEASE_GCC49/FV" fmw)))))))))) | ||
| 26 | |||
| 27 | (define-public libvirt-new | ||
| 28 | (package | 14 | (package |
| 29 | (inherit libvirt) | 15 | (inherit libvirt) |
| 30 | (name "libvirt-new") | 16 | (name "libvirt-ovmf") |
| 31 | (inputs | 17 | (inputs |
| 32 | (modify-inputs (package-inputs libvirt) | 18 | (modify-inputs (package-inputs libvirt) |
| 33 | (append ovmf-new))))) | 19 | (append qemu))) |
| 20 | (arguments | ||
| 21 | (substitute-keyword-arguments (package-arguments libvirt) | ||
| 22 | ((#:phases phases) | ||
| 23 | #~(modify-phases #$phases | ||
| 24 | (add-after 'install 'install-firmware | ||
| 25 | (lambda _ | ||
| 26 | (let ((fmw (string-append #$output "/share/qemu"))) | ||
| 27 | (mkdir-p fmw) | ||
| 28 | (copy-recursively #$(file-append qemu "/share/qemu") fmw)))))))))) | ||
| 34 | 29 | ||
| 35 | (define-public virt-manager-ovmf | 30 | (define-public virt-manager-ovmf |
| 36 | (package | 31 | (package |
| 37 | (inherit virt-manager) | 32 | (inherit virt-manager) |
| 38 | (name "virt-manager-ovmf") | 33 | (name "virt-manager-ovmf") |
| 39 | (arguments | 34 | (inputs |
| 40 | (substitute-keyword-arguments (package-arguments virt-manager) | 35 | (modify-inputs (package-inputs virt-manager) |
| 41 | ((#:phases phases) | 36 | (append qemu))) |
| 42 | #~(modify-phases #$phases | 37 | (arguments |
| 43 | (add-after 'install 'ovmf | 38 | (substitute-keyword-arguments (package-arguments virt-manager) |
| 44 | (lambda _ | 39 | ((#:phases phases) |
| 45 | (let ((fmw (string-append #$output "/usr/share/OVMF"))) | 40 | #~(modify-phases #$phases |
| 46 | (mkdir-p fmw) | 41 | (add-after 'install 'install-firmware |
| 47 | (copy-recursively #$(file-append ovmf-new "/share/firmware") fmw) | 42 | (lambda _ |
| 48 | ;(mkdir-p fmw) | 43 | (let ((fmw (string-append #$output "/share/qemu"))) |
| 49 | (copy-recursively "Build/OvmfX64/RELEASE_GCC49/FV" fmw)))))))))) | 44 | (mkdir-p fmw) |
| 45 | (copy-recursively #$(file-append qemu "/share/firmware") fmw)))))))))) | ||
