refactor some things, fix docker

This commit is contained in:
Freya Murphy 2024-08-10 21:24:06 -04:00
parent 30c292afa0
commit 83055b5e64
Signed by: freya
GPG key ID: 744AB800E383AE52
7 changed files with 127 additions and 70 deletions

6
certs/non-guix.pub Normal file
View file

@ -0,0 +1,6 @@
(public-key
(ecc
(curve Ed25519)
(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)
)
)

View file

@ -1,3 +1,3 @@
exec-once = hyprctl plugin load /run/current-system/profile/lib/libhy3.so exec-once = hyprctl plugin load ~/.guix-home/profile/lib/libhy3.so
exec-once = hyprctl plugin load /run/current-system/profile/lib/libhyprbars.so exec-once = hyprctl plugin load ~/.guix-home/profile/lib/libhyprbars.so
exec-once = hyprctl plugin load /run/current-system/profile/lib/libhyprexpo.so exec-once = hyprctl plugin load ~/.guix-home/profile/lib/libhyprexpo.so

View file

@ -17,13 +17,9 @@
# environment. # environment.
home.packages = with pkgs; [ home.packages = with pkgs; [
# Main packages # Main packages
yt-dlp
starship starship
discord discord
thunderbirdPackages.thunderbird-115 thunderbirdPackages.thunderbird-115
slack
cryptomator
pcem
cider cider
#steam #steam

View file

@ -18,21 +18,39 @@
(freya services pipewire) (freya services pipewire)
(freya packages shells) (freya packages shells)
(freya packages mozillia) (freya packages mozillia)
(freya packages librewolf)
(freya packages vim) (freya packages vim)
(freya packages gnome-xyz) (freya packages gnome-xyz)
(freya packages shells) (freya packages shells)
(freya packages certs) (freya packages certs)
(freya packages wm)
(freya packages linux)
(freya packages networking)
(freya packages audio)) (freya packages audio))
(home-environment (home-environment
;; Below is the list of packages that will show up in your ;; Below is the list of packages that will show up in your
;; Home profile, unser ~/.guix-home/profile. ;; Home profile, unser ~/.guix-home/profile.
(packages (append (specifications->packages (list ; desktop programs (packages (append (specifications->packages (list ; desktop env
"swayfx"
"swaybg"
"swayidle"
"cage"
"libnotify"
; xdg
"xdg-desktop-portal-wlr"
"xdg-desktop-portal-gtk"
; gtk
"wxwidgets"
"matcha-theme"
; desktop programs
"gnome-keyring" "gnome-keyring"
"gimp" "gimp"
"ungoogled-chromium" "ungoogled-chromium"
"librewolf"
"steam" "steam"
; terminal ; terminal
@ -88,6 +106,8 @@
"neofetch" "neofetch"
"pfetch" "pfetch"
"fd" "fd"
"yt-dlp"
"pinentry"
; utilities ; utilities
"qbittorrent" "qbittorrent"
@ -101,6 +121,8 @@
; programs ; programs
neovim-new neovim-new
easyeffects easyeffects
firefox-wayland-new
librewolf-new
; gtk ; gtk
lavanda-gtk-theme lavanda-gtk-theme
@ -108,7 +130,24 @@
; shell ; shell
zsh-autosuggestions zsh-autosuggestions
vim-plug))) vim-plug
; desktop
swaylock-effects-new
waybar-new
; bluetooth
blueman-new
overskride
; hyprwm
hyprland
hyprlock
hyprpaper
hypridle
hyprland-plugin-hy3
hyprland-plugins
xdg-desktop-portal-hyprland)))
;; Below is the list of Home services. To search for available ;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal. ;; services, run 'guix home search KEYWORD' in a terminal.
@ -143,8 +182,6 @@
(service home-files-service-type (service home-files-service-type
`((".local/share/nvim/site/autoload/plug.vim" ,(file-append vim-plug "/share/vim/plug.vim")) `((".local/share/nvim/site/autoload/plug.vim" ,(file-append vim-plug "/share/vim/plug.vim"))
(".ssh/config" ,(local-file "config/ssh/config")) (".ssh/config" ,(local-file "config/ssh/config"))
;(".gnupg/sshcontrol" ,(local-file "config/gnupg/sshcontrol"))
;(".gnupg/gpg-agent.conf" ,(local-file "config/gnupg/gpg-agent.conf"))
(".local/share/fonts" ,(local-file "local/fonts" #:recursive? #t)) (".local/share/fonts" ,(local-file "local/fonts" #:recursive? #t))
(".local/share/applications" ,(local-file "local/applications" #:recursive? #t)) (".local/share/applications" ,(local-file "local/applications" #:recursive? #t))
(".local/share/icons" ,(local-file "local/icons" #:recursive? #t)) (".local/share/icons" ,(local-file "local/icons" #:recursive? #t))

View file

@ -0,0 +1,59 @@
(define-module (freya packages librewolf)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module (guix build-system trivial)
#:use-module (gnu)
#:use-module (gnu packages bash)
#:use-module (gnu packages linux)
#:use-module (gnu packages librewolf)
#:use-module (freya packages linux))
(define-public librewolf-new
(package
(name "librewolf-new")
(source #f)
(version "0.1")
(synopsis "Simple wrapper for pipewire in librewolf")
(description "Simple wrapper for pipewire in librewolf")
(home-page "https://librewolf.net/")
(license license:mpl2.0)
(inputs
`(("bash" ,bash-minimal)
("pipewire" ,pipewire-new)
("librewolf" ,librewolf)))
(build-system trivial-build-system)
(arguments
'(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let* ((bash (assoc-ref %build-inputs "bash"))
(librewolf (assoc-ref %build-inputs "librewolf"))
(pipewire (assoc-ref %build-inputs "pipewire"))
(out (assoc-ref %outputs "out"))
(exe (string-append out "/bin/librewolf")))
(mkdir-p (dirname exe))
(call-with-output-file exe
(lambda (port)
;; NOTE: added "export LD_LIBRARY_PATH=pipewire"
;; maybe this can be done better with `wrap-programm'
(format port "#!~a \n
export LD_LIBRARY_PATH=~a \n
export MOZ_ENABLE_WAYLAND=1 \n
export MOZ_USE_XINPUT2=1 \n
exec ~a $@\n"
(string-append bash "/bin/bash")
(string-append pipewire "/lib")
(string-append librewolf "/bin/librewolf"))))
(chmod exe #o555)
;; Provide the manual and .desktop file.
(copy-recursively (string-append librewolf "/share")
(string-append out "/share"))
(substitute* (string-append
out "/share/applications/librewolf.desktop")
((librewolf) out))
#t))))))

View file

@ -8,10 +8,10 @@
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix gexp)) #:use-module (guix gexp))
(define-public libvirt-new (define-public libvirt-ovmf
(package (package
(inherit libvirt) (inherit libvirt)
(name "libvirt-new") (name "libvirt-ovmf")
(inputs (inputs
(modify-inputs (package-inputs libvirt) (modify-inputs (package-inputs libvirt)
(append qemu))) (append qemu)))
@ -27,10 +27,10 @@
)) ))
)))))) ))))))
(define-public virt-manager-new (define-public virt-manager-ovmf
(package (package
(inherit virt-manager) (inherit virt-manager)
(name "virt-manager-new") (name "virt-manager-ovmf")
(inputs (inputs
(modify-inputs (package-inputs virt-manager) (modify-inputs (package-inputs virt-manager)
(append qemu))) (append qemu)))

View file

@ -30,11 +30,11 @@
#:use-module (nongnu packages linux) #:use-module (nongnu packages linux)
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:use-module (freya bootloader uki) #:use-module (freya bootloader uki)
#:use-module (freya packages wm)
#:use-module (freya packages certs) #:use-module (freya packages certs)
#:use-module (freya packages linux) #:use-module (freya packages linux)
#:use-module (freya packages gl) #:use-module (freya packages gl)
#:use-module (freya packages qt) #:use-module (freya packages qt)
#:use-module (freya packages wm)
#:use-module (freya packages networking) #:use-module (freya packages networking)
#:use-module (freya packages virtualization)) #:use-module (freya packages virtualization))
@ -49,7 +49,6 @@
(keyboard-layout (keyboard-layout "us")) (keyboard-layout (keyboard-layout "us"))
(host-name "ThisWillChange") (host-name "ThisWillChange")
;; The list of user accounts ('root' is implicit).
(users (cons* (user-account (users (cons* (user-account
(name "freya") (name "freya")
(comment "Freya Murphy") (comment "Freya Murphy")
@ -59,7 +58,7 @@
(supplementary-groups '("wheel" (supplementary-groups '("wheel"
"audio" "audio"
"lp" "lp"
;"docker" "docker"
"plugdev" "plugdev"
"libvirt" "libvirt"
"kvm" "kvm"
@ -68,14 +67,7 @@
"tty"))) "tty")))
%base-user-accounts)) %base-user-accounts))
(packages (append (specifications->packages (list ; desktop (packages (append (specifications->packages (list ; gtk
"swayfx"
"swaybg"
"swayidle"
"cage"
"libnotify"
; gtk
"wxwidgets" "wxwidgets"
"gtk+" "gtk+"
"dconf" "dconf"
@ -106,8 +98,6 @@
; xdg ; xdg
"xdg-utils" "xdg-utils"
"xdg-desktop-portal" "xdg-desktop-portal"
"xdg-desktop-portal-wlr"
"xdg-desktop-portal-gtk"
; firmware ; firmware
"sof-firmware" "sof-firmware"
@ -116,7 +106,7 @@
; needed programs ; needed programs
"qemu" "qemu"
"pulseaudio" "pulseaudio" ; pactl
"alsa-utils" "alsa-utils"
"neovim" "neovim"
@ -140,16 +130,13 @@
"openssl" "openssl"
; system daemons ; system daemons
"chrony"
"docker" "docker"
"containerd" "containerd"
"avahi" "avahi"
"gnupg" "gnupg"
"pinentry"
"light" "light"
"brightnessctl" "brightnessctl"
"wireguard-tools" "wireguard-tools"
"fprintd"
"libpcap" "libpcap"
; fonts ; fonts
@ -157,40 +144,21 @@
"font-google-noto-sans-cjk" "font-google-noto-sans-cjk"
"font-jetbrains-mono" "font-jetbrains-mono"
"font-dejavu")) "font-dejavu"))
(list ; desktop (list ; qt
swaylock-effects-new
waybar-new
; hyprwm
hyprland
hyprlock
hyprpaper
hypridle
hyprland-plugin-hy3
hyprland-plugins
xdg-desktop-portal-hyprland
; qt
qt5-styleplugins qt5-styleplugins
qt6gtk2 qt6gtk2
; bluetooth ; bluetooth
bluez-new bluez-new
blueman-new
overskride
; system ; system
virt-manager-new virt-manager-ovmf
freya-ca-certs freya-ca-certs
mesa) mesa)
%base-packages)) %base-packages))
;; Below is the list of system services. TO search for available
;; services. run 'guix system search KEYWORD' in a terminal.
(services (services
(append (list (append (list
;; To configure OpenSSH, pass an 'openssh-configuration'
;; 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 spice-vdagent-service-type) (service spice-vdagent-service-type)
@ -200,17 +168,16 @@
(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
(service avahi-service-type (service avahi-service-type
(avahi-configuration (avahi-configuration
(publish? #f) ;; do not advertise this machiene (publish? #f)
(publish-workstation? #f))) ; do not advertise, I want this to be as silent as possible (publish-workstation? #f)))
;(service docker-service-type) (service docker-service-type)
;(service chrony-sericve-type) (service containerd-service-type)
(service nix-service-type) (service nix-service-type)
(service libvirt-service-type (service libvirt-service-type
(libvirt-configuration (libvirt-configuration
(libvirt libvirt-new) (libvirt libvirt-ovmf)
(unix-sock-group "libvirt") (unix-sock-group "libvirt")
(tls-port "16555"))) (tls-port "16555")))
(service virtlog-service-type) (service virtlog-service-type)
@ -220,11 +187,8 @@
(experimental #t) (experimental #t)
(fast-connectable? #t))) (fast-connectable? #t)))
(service pam-limits-service-type) (service pam-limits-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
;; are appending to.
(modify-services %desktop-services (modify-services %desktop-services
(guix-service-type config => (guix-service-type config =>
(guix-configuration (guix-configuration
@ -233,13 +197,8 @@
(append (list "https://substitutes.nonguix.org") (append (list "https://substitutes.nonguix.org")
%default-substitute-urls)) %default-substitute-urls))
(authorized-keys (authorized-keys
(cons* (plain-file "non-guix.pub" (append (list (local-file "../../certs/non-guix.pub"))
"(public-key %default-authorized-guix-keys))))
(ecc
(curve Ed25519)
(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)
)
)" ) %default-authorized-guix-keys))))
(udev-service-type config => (udev-service-type config =>
(udev-configuration (udev-configuration
(inherit config))) (inherit config)))