libvirt pain

This commit is contained in:
Ryan Schanzenbacher 2023-09-07 14:45:05 -04:00
parent 438237dbff
commit 43ea80ea90
Signed by: ryan77627
GPG key ID: 81B0E222A3E2308E
4 changed files with 140 additions and 3 deletions

View file

@ -9,3 +9,8 @@ export PATH=$PATH:~/.nix-profile/bin
# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
exec Hyprland
fi

View file

@ -12,6 +12,7 @@
#:use-module (srfi srfi-1)
#:use-module (ryan-packages freedesktop)
#:use-module (ryan-packages wm)
#:use-module (ryan-packages virtualization)
#:use-module (rosenthal packages wm)
#:use-module (gnu packages security-token)
#:use-module (gnu services security-token)
@ -139,13 +140,13 @@
"v4l2loopback-linux-module"
"pipewire"
"docker"
"libvirt"
"virt-manager"
;"libvirt" ;New version inherited from service
;"virt-manager"
"dconf"
"wireplumber"
"wireshark"
"zsh"))
(list my-ca-certs swaylock-effects-new waybar-new xdg-desktop-portal-hyprland)
(list my-ca-certs swaylock-effects-new waybar-new xdg-desktop-portal-hyprland virt-manager-ovmf)
%my-base-packages ))
;; Below is the list of system services. To search for available
@ -169,6 +170,7 @@
(service nix-service-type)
(service libvirt-service-type
(libvirt-configuration
(libvirt libvirt-new)
(unix-sock-group "libvirt")))
(service virtlog-service-type)
(service bluetooth-service-type)

View file

@ -0,0 +1,81 @@
(define-module (ryan-packages audio)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix gexp)
#:use-module (guix build-system meson)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages glib)
#:use-module (gnu packages audio)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages gtk)
#:use-module (gnu packages xiph)
#:use-module (gnu packages tbb)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gnome)
#:use-module (gnu packages pretty-print)
#:use-module (gnu packages algebra)
#:use-module (gnu packages cpp)
#:use-module (gnu packages linux)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages cmake)
#:use-module (gnu packages maths)
#:use-module (gnu packages pkg-config))
(define-public easyeffects
(package
(name "easyeffects")
(version "7.0.1")
(arguments
(list
#:modules
'((guix build utils)
(guix build meson-build-system))
#:imported-modules
(append %meson-build-system-modules)
#:tests? #f))
(native-inputs (list gettext-minimal
itstool
desktop-file-utils
`(,glib "bin")
`(,gtk+ "bin")
pkg-config
cmake
appstream-glib))
(inputs (list zita-convolver
rnnoise
tbb
fftwf
lilv
fmt
rubberband
speexdsp
nlohmann-json
pipewire
libadwaita
libsigc++
libbs2b
libsndfile
libsamplerate
libebur128
libportal
gsl
speex
`(,util-linux "lib")))
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/wwmm/easyeffects/archive/refs/tags/v" version
".tar.gz"))
(sha256
(base32
"05j52fy51zjai7n0j23chydfgkfq9n82h2ih806z3b47zhk2h2j2"))))
(build-system meson-build-system)
(synopsis "Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications")
(description "This package provides @code{easyeffects}, which is an audio application for use atop of @code{pipewire}
that allows effects that modify sound sources and sinks. This cannot be updated to the latest version (7.0.8) because
the packaged version of @code{gtk} is too old.")
(home-page "https://github.com/wwmm/easyeffects")
(license license:gpl3+)))
easyeffects

View file

@ -0,0 +1,49 @@
;;; Stolen from https://g.tylerm.dev/tylerm/dotfiles/raw/branch/main/modules/home-packages/virtualization.scm
(define-module (ryan-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 (guix gexp))
(define 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))))))))))
(define-public libvirt-new
(package
(inherit libvirt)
(name "libvirt-new")
(inputs
(modify-inputs (package-inputs libvirt)
(append ovmf-new)))))
(define-public virt-manager-ovmf
(package
(inherit virt-manager)
(name "virt-manager-ovmf")
(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))))))))))