GNU/Windows

This commit is contained in:
Freya Murphy 2023-09-07 15:20:42 -04:00
parent b4e63143f1
commit 2396b0aeb6
No known key found for this signature in database
GPG key ID: 988032A5638EE799
5 changed files with 134 additions and 19 deletions

47
:w Normal file
View file

@ -0,0 +1,47 @@
(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 libvirt-new
(package
(inherit libvirt)
(inputs
(modify-inputs (package-inputs libvirt)
(append ovmf-new)))
(arguments
(substitute-keyword-arguments (package-arguments libvirt)
((#: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))
(let ((fmw (string-append #$output "/share/qemu")))
(mkdir-p fmw)
(copy-recursively #$(file-append qemu "/share/qemu") fmw))
))
))))))
(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)
)))
))))))

View file

@ -48,4 +48,5 @@ bindsym XF86AudioPrev exec playerctl previous
# Screenshot
bindsym Print exec grim -g "$(slurp)" - | wl-copy
bindsym Alt+Print exec grim - | wl-copy
bindsym Shift+Print exec slurp -p | grim -g - - | convert - txt:- | tail -n 1 | awk '{print $3}' | wl-copy

View file

@ -21,6 +21,7 @@
#:use-module (gnu services sound)
#:use-module (gnu services docker)
#:use-module (gnu services avahi)
#:use-module (gnu services spice)
#:use-module (gnu services authentication)
#:use-module (gnu services virtualization)
#:use-module (home-packages wm)
@ -76,7 +77,6 @@
"nss-certs"
"gvfs"
"gnupg"
;; "virt-manager"
"light"
"waybar"
"avahi"
@ -97,8 +97,19 @@
"xorg-server-xwayland"
"fprintd"
"wireplumber"
"wireshark"
"qemu"
"spice"
"xf86-video-qxl"
"zsh"
"mesa"
"mesa-utils"
"glu"
"vulkan-loader"
"vulkan-validationlayers"
"vulkan-tools"
"vulkan-headers"
"spirv-tools"
"spirv-headers"
"neovim"))
(list swaylock-effects-new virt-manager-new)
%my-base-packages))
@ -112,6 +123,7 @@
;; record as a second argument to 'service' below.
(service openssh-service-type)
(service pcscd-service-type)
(service spice-vdagent-service-type)
(service cups-service-type
(cups-configuration
(web-interface? #t)))
@ -125,7 +137,8 @@
(service libvirt-service-type
(libvirt-configuration
(libvirt libvirt-new)
(unix-sock-group "libvirt")))
(unix-sock-group "libvirt")
(tls-port "16555")))
(service virtlog-service-type)
(service bluetooth-service-type)
(service pam-limits-service-type)

View file

@ -21,5 +21,6 @@
(let ((fmw (string-append #$output "/share/firmware")))
(mkdir-p fmw)
(copy-recursively "Build/OvmfX64/RELEASE_GCC49/FV" fmw)
(copy-file "Build/OvmfX64/RELEASE_GCC49/FV/OVMF.fd" (string-append fmw "/OVMF_CODE.fd"))
)))
))))))

View file

@ -12,24 +12,77 @@
(define-public libvirt-new
(package
(inherit libvirt)
(name "libvirt-new")
(inputs
(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))
(let ((fmw (string-append #$output "/usr/share/OVMF")))
(mkdir-p fmw)
(copy-recursively #$(file-append ovmf-new "/share/firmware") fmw))
))
))))))
(define-public virt-manager-new
(package
(inherit virt-manager)
(name "virt-manager-new")
(inputs
(modify-inputs (package-inputs virt-manager)
(append qemu)))
(arguments
(substitute-keyword-arguments (package-arguments virt-manager)
((#:phases phases)
#~(modify-phases #$phases
(add-after 'install 'ovmf
(add-after 'install 'install-firmware
(lambda _
(let ((fmw (string-append #$output "/share/qemu")))
(mkdir-p fmw)
(copy-recursively #$(file-append qemu "/share/firmware") fmw))
(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)
)))
(copy-recursively #$(file-append ovmf-new "/share/firmware") fmw))
))
))))))
;; (define-public libvirt-new
;; (package
;; (inherit libvirt)
;; (inputs
;; (modify-inputs (package-inputs libvirt)
;; (append ovmf-new)))
;; (arguments
;; (substitute-keyword-arguments (package-arguments libvirt)
;; ((#: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))
;; ))
;; ))))))
;; (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)
;; )))
;; ))))))