summaryrefslogtreecommitdiff
path: root/dom0
diff options
context:
space:
mode:
Diffstat (limited to 'dom0')
-rw-r--r--dom0/files/misc-config/sway-config6
-rw-r--r--dom0/home-laptop.scm89
-rw-r--r--dom0/home.scm50
-rw-r--r--dom0/system-laptop.scm16
-rw-r--r--dom0/system.scm11
5 files changed, 139 insertions, 33 deletions
diff --git a/dom0/files/misc-config/sway-config b/dom0/files/misc-config/sway-config
index e654cea..60e6eed 100644
--- a/dom0/files/misc-config/sway-config
+++ b/dom0/files/misc-config/sway-config
@@ -26,9 +26,9 @@ output * bg $HOME/.config/guix-config/dom0/files/wallpapers/taclnc.png fill
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
-output * resolution 1920x1080 position 1920,0
+output * resolution 1920x1080
exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY
-exec spice-vdagent
+# exec spice-vdagent
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Idle configuration
@@ -222,7 +222,7 @@ bar {
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
- status_command while date +'%Y-%m-%d %X'; do sleep 1; done
+ status_command while (echo "! ! WARNING ! ! THIS IS Dom0 ! ! $(date +'%Y-%m-%d %X')"); do sleep 1; done
colors {
statusline #ffffff
diff --git a/dom0/home-laptop.scm b/dom0/home-laptop.scm
new file mode 100644
index 0000000..f1146b7
--- /dev/null
+++ b/dom0/home-laptop.scm
@@ -0,0 +1,89 @@
+(define-module (dom0 home)
+ #:use-module (gnu)
+ #:use-module (gnu packages gnupg)
+ #:use-module (gnu services)
+ #:use-module (gnu home)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services pm)
+ #:use-module (gnu home services sound)
+ #:use-module (gnu home services shells)
+ #:use-module (gnu home services desktop)
+ #:use-module (gnu home services gnupg)
+ #:use-module (gnu home services xdg)
+ #:use-module (guix gexp)
+ #:export (dom0-home-environment))
+
+ (use-package-modules compression gnome gnome-xyz video fonts freedesktop
+ linux package-management pulseaudio ssh
+ terminals xdisorg xorg glib virtualization
+ wm messaging)
+
+ (define dom0-home-environment
+ (home-environment
+ (services
+ (list
+ (simple-service 'profile-env-vars-service
+ home-environment-variables-service-type
+ '(;; Sort dot files first in ls
+ ("LC_COLLATE" . "C")
+
+ ;; vim instead of nano
+ ("VISUAL" . "vim")
+ ("EDITOR" . "vim")
+
+ ;; Wayland
+ ("XDG_CURRENT_DESKTOP" . "sway")
+ ("XDG_SESSION_TYPE" . "wayland")
+ ("RTC_USE_PIPEWIRE" . "true")
+ ("SDL_VIDEODRIVER" . "wayland")
+ ("MOZ_ENABLE_WAYLAND" . "1")
+ ("CLUTTER_BACKEND" . "wayland")
+ ("ELM_ENGINE" . "wayland_egl")
+ ("ECORE_EVAS_ENGINE" . "wayland-egl")
+ ("QT_QPA_PLATFORM" . "wayland-egl")
+
+ ;; JAVA
+ ("_JAVA_AWT_WM_NONREPARENTING" . #t)
+
+ ;; env-vars for Flatpak visibility
+ ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share")))
+
+ (service home-bash-service-type
+ (home-bash-configuration
+ (bash-profile (list (local-file "files/scripts/sway-login")
+ (plain-file "bash-profile" "flatpak -u remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo")))
+ (bashrc (list (local-file "files/scripts/gpg-agent-tty")))))
+
+ (simple-service 'xdg-user-directories-config-service
+ home-xdg-user-directories-service-type
+ (home-xdg-user-directories-configuration
+ (download "$HOME/Downloads")))
+
+ (service home-xdg-configuration-files-service-type
+ `(("sway/config" ,(local-file "./files/misc-config/sway-config"))))
+
+ (service home-gpg-agent-service-type
+ (home-gpg-agent-configuration
+ (pinentry-program
+ (file-append pinentry "/bin/pinentry"))
+ (ssh-support? #t)))
+
+ (service home-dbus-service-type)
+ (service home-pipewire-service-type)))
+
+ (packages (list xorg-server-xwayland
+ sway swayidle swaylock fuzzel foot
+ grimshot wl-clipboard network-manager-applet
+ xdg-desktop-portal xdg-desktop-portal-gtk
+ xdg-desktop-portal-wlr xdg-utils xdg-dbus-proxy shared-mime-info
+
+ ;; Flatpak and XDG
+ flatpak (list glib "bin") ; flatpak dependency
+ xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-wlr
+ xdg-utils xdg-dbus-proxy shared-mime-info
+
+ ;; Audio
+ alsa-utils pavucontrol
+
+ ;; General
+ openssh zip unzip))))
diff --git a/dom0/home.scm b/dom0/home.scm
index ee1028d..0b76b53 100644
--- a/dom0/home.scm
+++ b/dom0/home.scm
@@ -10,13 +10,14 @@
#:use-module (gnu home services desktop)
#:use-module (gnu home services gnupg)
#:use-module (gnu home services xdg)
+ #:use-module (nongnu packages nvidia)
#:use-module (guix gexp)
#:export (dom0-home-environment))
- (use-package-modules compression gnome fonts freedesktop
+ (use-package-modules compression gnome gnome-xyz video fonts freedesktop
linux package-management pulseaudio ssh
terminals xdisorg xorg glib virtualization
- wm)
+ wm messaging)
(define dom0-home-environment
(home-environment
@@ -40,12 +41,24 @@
("CLUTTER_BACKEND" . "wayland")
("ELM_ENGINE" . "wayland_egl")
("ECORE_EVAS_ENGINE" . "wayland-egl")
- ("QT_QPA_PLATFORM" . "wayland-egl")))
+ ("QT_QPA_PLATFORM" . "wayland-egl")
+
+ ;; JAVA
+ ("_JAVA_AWT_WM_NONREPARENTING" . #t)
+
+ ;; env-vars for Flatpak visibility
+ ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share")))
(service home-bash-service-type
(home-bash-configuration
- (bash-profile (list (local-file "files/scripts/sway-login")))
+ (bash-profile (list (local-file "files/scripts/sway-login")
+ (plain-file "bash-profile" "flatpak -u remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo")))
(bashrc (list (local-file "files/scripts/gpg-agent-tty")))))
+
+ (simple-service 'xdg-user-directories-config-service
+ home-xdg-user-directories-service-type
+ (home-xdg-user-directories-configuration
+ (download "$HOME/Downloads")))
(service home-xdg-configuration-files-service-type
`(("sway/config" ,(local-file "./files/misc-config/sway-config"))))
@@ -55,20 +68,23 @@
(pinentry-program
(file-append pinentry "/bin/pinentry"))
(ssh-support? #t)))
+
(service home-dbus-service-type)
(service home-pipewire-service-type)))
- (packages (list xorg-server-xwayland
- sway swayidle swaylock fuzzel foot
- grimshot wl-clipboard network-manager-applet
- xdg-desktop-portal xdg-desktop-portal-gtk
- xdg-desktop-portal-wlr xdg-utils xdg-dbus-proxy shared-mime-info
-
- ;; Flatpak
- flatpak (list glib "bin")
+ (packages (append (map replace-mesa (list flatpak sway))
+ (list xorg-server-xwayland
+ swayidle swaylock fuzzel foot
+ grimshot wl-clipboard network-manager-applet
+
+ ;; XDG and Flatpak dependency
+ (list glib "bin")
+ xdg-desktop-portal xdg-desktop-portal-gtk
+ xdg-desktop-portal-wlr xdg-utils xdg-dbus-proxy
+ shared-mime-info
- ;; Audio
- alsa-utils pavucontrol
-
- ;; General
- virt-manager openssh zip unzip))))
+ ;; Audio
+ alsa-utils pavucontrol
+
+ ;; General
+ openssh zip unzip)))))
diff --git a/dom0/system-laptop.scm b/dom0/system-laptop.scm
index d7f9ba5..20bdc89 100644
--- a/dom0/system-laptop.scm
+++ b/dom0/system-laptop.scm
@@ -26,13 +26,13 @@
;; Users ('root' is implicit).
(users (cons* (user-account
- (name "dom0")
- (comment "dom0")
- (group "users")
- (home-directory "/home/dom0")
- (supplementary-groups '("wheel" "libvirt" "kvm"
+ (name "dom0")
+ (comment "dom0")
+ (group "users")
+ (home-directory "/home/dom0")
+ (supplementary-groups '("wheel" "libvirt" "kvm"
"netdev" "audio" "video")))
- %base-user-accounts))
+ %base-user-accounts))
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
@@ -94,8 +94,7 @@
(list
;; NVIDIA
(service nvidia-service-type)
- ;(service kernel-module-loader-service-type
- ;'("nvidia"))
+
;; systemd dependencies
(service elogind-service-type)
@@ -171,5 +170,6 @@
(packages (cons* vim
git
cryptsetup
+ virt-manager
strace
%base-packages)))
diff --git a/dom0/system.scm b/dom0/system.scm
index 4a0cae9..72039a1 100644
--- a/dom0/system.scm
+++ b/dom0/system.scm
@@ -42,11 +42,11 @@
;; replace post-install
(swap-devices (list (swap-space
(target (uuid
- "c7e7ee28-23ba-4ec1-b206-19a4e6297083")))))
+ "c7e7ee28-23ba-4ec1-b206-19a4e6297083")))))
;; luks setup - uncomment post-install
;; and provide source UUID once known
(mapped-devices (list (mapped-device
- (source (uuid "61e732e5-97ca-41d8-a1cf-3672eb97e6f8")
+ (source (uuid "61e732e5-97ca-41d8-a1cf-3672eb97e6f8"))
(target "system-root")
(type luks-device-mapping))))
@@ -94,8 +94,7 @@
(list
;; NVIDIA
(service nvidia-service-type)
- ;(service kernel-module-loader-service-type
- ;'("nvidia"))
+
;; systemd dependencies
(service elogind-service-type)
@@ -157,7 +156,8 @@
;; Virtualization
(service libvirt-service-type
(libvirt-configuration
- (libvirt (patch-libvirt libvirt))))
+ (libvirt (patch-libvirt libvirt))
+ (qemu (replace-mesa qemu))))
(service virtlog-service-type)
;; udev
@@ -170,6 +170,7 @@
;; Packages (system-wide)
(packages (cons* vim
git
+ (replace-mesa virt-manager)
cryptsetup
strace
%base-packages)))