;; Modules to import to access variables used. (define-module (disposable icecat-dsp) #:use-module (gnu) #:use-module (gnu home) #:use-module (gnu home services) #:use-module (gnu home services desktop) #:use-module (gnu packages gnuzilla) #:use-module (nongnu packages linux) #:use-module (disposable packages x-resize-kiosk)) (use-service-modules linux guix pm audio virtualization xorg desktop networking dbus spice) (use-package-modules linux audio libusb wm fonts security-token freedesktop xorg xdisorg browser-extensions) (define guest-environment (home-environment (packages (list icecat ublock-origin/icecat x-resize-kiosk)) (services (list (service home-startx-command-service-type (xorg-configuration (modules (cons xf86-video-qxl %default-xorg-modules)) (keyboard-layout (keyboard-layout "gb")))) (simple-service 'add-xinitrc home-files-service-type `((".xinitrc" ,(plain-file "xinitrc" (string-append "spice-vdagent \n" "x-resize -kd &\n" "exec icecat"))))))))) (operating-system (locale "en_GB.utf8") (timezone "Europe/London") (keyboard-layout (keyboard-layout "gb")) (host-name "icecat-dsp") ;; Users ('root' is implicit). (users (cons (user-account (name "guest") (comment "") (password (crypt "test" "$6$abc")) (group "users") (supplementary-groups '("audio" "video" "plugdev"))) %base-user-accounts)) (bootloader (bootloader-configuration (timeout 0) (terminal-outputs '(serial)) (bootloader grub-bootloader))) (file-systems (cons (file-system (device (file-system-label "system-root")) (mount-point "/") (type "ext4")) %base-file-systems)) ;; Non-free (kernel linux) ;; Services (system-wide) (services (append (modify-services %base-services ;; Add non-free substitutes (delete login-service-type) (delete mingetty-service-type) (delete console-font-service-type) (guix-service-type config => (guix-configuration (inherit config) (substitute-urls (append (list "https://substitutes.nonguix.org") %default-substitute-urls)) (authorized-keys (append (list (local-file "../files/nonguix-signing-key.pub")) %default-authorized-guix-keys))))) (list (service greetd-service-type (greetd-configuration (greeter-supplementary-groups (list "video" "input")) (terminals (list (greetd-terminal-configuration (terminal-vt "1") (terminal-switch #t) (initial-session-user "guest") (initial-session-command "startx")) (greetd-terminal-configuration (terminal-vt "2")) (greetd-terminal-configuration (terminal-vt "3")))))) (service guix-home-service-type `(("guest" ,guest-environment))) ;; spice for VMs (service dbus-root-service-type) (service spice-vdagent-service-type) (service qemu-guest-agent-service-type) (service elogind-service-type) (service network-manager-service-type) (service wpa-supplicant-service-type) ;; udev (udev-rules-service 'pipewire-add-udev-rules pipewire) (udev-rules-service 'fido2 libfido2 #:groups '("plugdev"))))))