OVMFFFFFFFF

This commit is contained in:
Freya Murphy 2023-09-06 12:02:40 -04:00
parent f47cd8ed0b
commit dbbd9fa1de
No known key found for this signature in database
GPG key ID: 988032A5638EE799
3 changed files with 136 additions and 97 deletions

View file

@ -9,6 +9,7 @@
(gnu packages vim) (gnu packages vim)
(gnu packages gcc) (gnu packages gcc)
(gnu packages gnupg) (gnu packages gnupg)
(gnu packages virtualization)
(gnu services) (gnu services)
(guix packages) (guix packages)
(guix gexp) (guix gexp)
@ -71,6 +72,7 @@
"netcat" "netcat"
"ripgrep" "ripgrep"
"fd" "fd"
"nasm"
"node" "node"
"tree-sitter-cli" "tree-sitter-cli"
"python-pynvim")) "python-pynvim"))

View file

@ -1,36 +1,36 @@
(define-module (home-config base-system) (define-module (home-config base-system)
#:use-module (gnu) #:use-module (gnu)
#:use-module (nongnu packages linux) #:use-module (nongnu packages linux)
#:use-module (gnu system setuid) #:use-module (gnu system setuid)
#:use-module (gnu packages admin) #:use-module (gnu packages admin)
#:use-module (gnu packages avahi) #:use-module (gnu packages avahi)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (gnu packages shells) #:use-module (gnu packages shells)
#:use-module (guix build-system trivial) #:use-module (gnu packages tls)
#:use-module (guix licenses) #:use-module (srfi srfi-1)
#:use-module (gnu packages tls) #:use-module (gnu packages security-token)
#:use-module (srfi srfi-1) #:use-module (gnu services security-token)
#:use-module (home-packages wm) #:use-module (gnu packages virtualization)
#:use-module (gnu packages security-token) #:use-module (gnu services cups)
#:use-module (gnu services security-token) #:use-module (gnu services desktop)
#:use-module (gnu services cups) #:use-module (gnu services networking)
#:use-module (gnu services desktop) #:use-module (gnu services xorg)
#:use-module (gnu services networking) #:use-module (gnu services ssh)
#:use-module (gnu services xorg) #:use-module (gnu services nix)
#:use-module (gnu services ssh) #:use-module (gnu services sound)
#:use-module (gnu services nix) #:use-module (gnu services docker)
#:use-module (gnu services sound) #:use-module (gnu services avahi)
#:use-module (gnu services docker)
#:use-module (gnu services avahi)
#:use-module (gnu services authentication) #:use-module (gnu services authentication)
#:use-module (gnu services virtualization)) #:use-module (gnu services virtualization)
#:use-module (home-packages wm)
#:use-module (home-services virtualization))
(define %my-base-packages (define %my-base-packages
(remove (lambda (package) (remove (lambda (package)
(member (package-name package) (member (package-name package)
(list "sudo" "nano"))) (list "sudo" "nano")))
%base-packages)) %base-packages))
(define %backlight-udev-rule (define %backlight-udev-rule
(udev-rule (udev-rule
@ -44,95 +44,94 @@
(define-public base-operating-system (define-public base-operating-system
(operating-system (operating-system
(kernel linux) (kernel linux)
(firmware (list linux-firmware intel-microcode sof-firmware)) (firmware (list linux-firmware intel-microcode sof-firmware))
(locale "en_US.utf8") (locale "en_US.utf8")
(timezone "America/New_York") (timezone "America/New_York")
(keyboard-layout (keyboard-layout "us")) (keyboard-layout (keyboard-layout "us"))
(host-name "ThisWillChange") (host-name "ThisWillChange")
;; The list of user accounts ('root' is implicit). ;; The list of user accounts ('root' is implicit).
(users (cons* (user-account (users (cons* (user-account
(name "tylerm") (name "tylerm")
(comment "Tyler") (comment "Tyler")
(group "users") (group "users")
(home-directory "/home/tylerm") (home-directory "/home/tylerm")
(shell (file-append zsh "/bin/zsh")) (shell (file-append zsh "/bin/zsh"))
(supplementary-groups '("wheel" "audio" "lp" "docker" "plugdev" "libvirt" "kvm" "netdev" "video" "tty"))) (supplementary-groups '("wheel" "audio" "lp" "docker" "plugdev" "libvirt" "kvm" "netdev" "video" "tty")))
%base-user-accounts)) %base-user-accounts))
(packages (append (map specification->package (list "swayfx" (packages (append (map specification->package (list "swayfx"
"swaybg" "swaybg"
"wlogout" "wlogout"
"sof-firmware" "sof-firmware"
"intel-microcode" "intel-microcode"
"alsa-utils" "alsa-utils"
"swayidle" "swayidle"
;"swaylock" "dconf"
"alacritty" "alacritty"
"gnome-themes-extra" "gnome-themes-extra"
"adwaita-icon-theme" "adwaita-icon-theme"
"hicolor-icon-theme" "hicolor-icon-theme"
"git" "git"
"nss-certs" "nss-certs"
"gnupg" "gvfs"
"light" "gnupg"
"waybar" "virt-manager"
"avahi" "light"
"mako" "waybar"
"grim" "avahi"
"slurp" "mako"
"wl-clipboard" "grim"
"bluez" "slurp"
"blueman" "wl-clipboard"
"opendoas" "bluez"
"xdg-desktop-portal" "blueman"
"xdg-desktop-portal-wlr" "opendoas"
"v4l2loopback-linux-module" "xdg-desktop-portal"
"docker" "xdg-desktop-portal-wlr"
"v4l2loopback-linux-module"
"docker"
"linux-pam" "linux-pam"
"pulseaudio" "pulseaudio"
;;"pipewire" ;;"pipewire"
"libx11" "libx11"
"xorg-server-xwayland" "xorg-server-xwayland"
"fprintd" "fprintd"
"wireplumber" "wireplumber"
"virt-manager" "wireshark"
"wireshark" "zsh"
"zsh"
"neovim")) "neovim"))
(list swaylock-effects-new) (list swaylock-effects-new)
%my-base-packages)) %my-base-packages))
;; Below is the list of system services. TO search for available ;; Below is the list of system services. TO search for available
;; services. run 'guix system search KEYWORD' in a terminal. ;; services. run 'guix system search KEYWORD' in a terminal.
(services (services
(append (list (append (list
;; To configure OpenSSH, pass an 'openssh-configuration' ;; To configure OpenSSH, pass an 'openssh-configuration'
;; record as a second argument to 'service' below. ;; record as a second argument to 'service' below.
(service openssh-service-type) (service openssh-service-type)
(service pcscd-service-type) (service pcscd-service-type)
(service cups-service-type (service cups-service-type
(cups-configuration (cups-configuration
(web-interface? #t))) (web-interface? #t)))
;; Avahi is only present for CUPS to support "automagic" printing ;; Avahi is only present for CUPS to support "automagic" printing
(service avahi-service-type (service avahi-service-type
(avahi-configuration (avahi-configuration
(publish? #f) ;; do not advertise this machiene (publish? #f) ;; do not advertise this machiene
(publish-workstation? #f))) ; do not advertise, I want this to be as silent as possible (publish-workstation? #f))) ; do not advertise, I want this to be as silent as possible
(service docker-service-type) (service docker-service-type)
(service nix-service-type) (service nix-service-type)
(service libvirt-service-type (service my-libvirt-service-type)
(libvirt-configuration (service virtlog-service-type)
(unix-sock-group "libvirt"))) (service bluetooth-service-type)
(service virtlog-service-type)
(service bluetooth-service-type)
(service pam-limits-service-type) (service pam-limits-service-type)
(service fprintd-service-type) (service fprintd-service-type)
(udev-rules-service 'fido2 libfido2 #:groups '("plugdev"))) (udev-rules-service 'fido2 libfido2 #:groups '("plugdev")))
;; This is the default list of services we ;; This is the default list of services we
;; are appending to. ;; are appending to.
(modify-services %desktop-services (modify-services %desktop-services
(guix-service-type config => (guix-service-type config =>
(guix-configuration (guix-configuration
@ -152,9 +151,9 @@
(udev-configuration (udev-configuration
(inherit config))) (inherit config)))
(delete pulseaudio-service-type) (delete pulseaudio-service-type)
(delete gdm-service-type) (delete gdm-service-type)
(delete avahi-service-type) (delete avahi-service-type)
(delete alsa-service-type)))) (delete alsa-service-type))))
(name-service-switch %mdns-host-lookup-nss) (name-service-switch %mdns-host-lookup-nss)

View file

@ -0,0 +1,38 @@
(define-module (home-services virtualization)
#: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 (guix gexp))
(define my-libvirt
(package
(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"))))
(define-public my-libvirt-service-type
(service-type
(name 'my-libvirt)
(extensions
(list
(service-extension libvirt-service-type
(lambda (config)
(libvirt-configuration
(libvirt my-libvirt)
(unix-sock-group "libvirt")))
)
(service-extension special-files-service-type
ovmf-special-files)
))
(default-value #f)
(description "Libvirt with OVMF")))