summaryrefslogtreecommitdiff
path: root/disposable
diff options
context:
space:
mode:
authorc0co.channel <c0co.channel@braincrime.com>2025-09-20 16:24:16 +0100
committerc0co.channel <c0co.channel@braincrime.com>2025-09-20 16:24:16 +0100
commite9ae23f145af5dad17175d73d9095860ec0a4c07 (patch)
tree26194fa5c12ef16345ffe2c9a3397572f0c383bf /disposable
parent9715f33cfd7446099ec9e26e075b6a6b1904d0a3 (diff)
Reorganize path structure, add disp browsers & pwn
Diffstat (limited to 'disposable')
-rw-r--r--disposable/firefox-dsp.scm106
-rw-r--r--disposable/icecat-dsp.scm106
-rw-r--r--disposable/packages/x-resize-kiosk.scm22
3 files changed, 234 insertions, 0 deletions
diff --git a/disposable/firefox-dsp.scm b/disposable/firefox-dsp.scm
new file mode 100644
index 0000000..f335d62
--- /dev/null
+++ b/disposable/firefox-dsp.scm
@@ -0,0 +1,106 @@
+;; 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 (nongnu packages mozilla)
+ #: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 firefox 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 firefox")))))))))
+
+(operating-system
+ (locale "en_GB.utf8")
+ (timezone "Europe/London")
+ (keyboard-layout (keyboard-layout "gb"))
+ (host-name "firefox-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"))))))
diff --git a/disposable/icecat-dsp.scm b/disposable/icecat-dsp.scm
new file mode 100644
index 0000000..f440ecc
--- /dev/null
+++ b/disposable/icecat-dsp.scm
@@ -0,0 +1,106 @@
+;; 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"))))))
diff --git a/disposable/packages/x-resize-kiosk.scm b/disposable/packages/x-resize-kiosk.scm
new file mode 100644
index 0000000..2cc154a
--- /dev/null
+++ b/disposable/packages/x-resize-kiosk.scm
@@ -0,0 +1,22 @@
+(define-module (disposable packages x-resize-kiosk)
+ #:use-module (gnu)
+ #:use-module (guix packages)
+ #:use-module (guix git-download)
+ #:export (x-resize-kiosk))
+
+(use-package-modules xdisorg)
+
+(define x-resize-kiosk
+ (package
+ (inherit x-resize)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/awth13/x-resize")
+ (commit "x-resize-kiosk")))
+ (file-name (git-file-name "x-resize-kiosk" "0.1"))
+ (sha256
+ (base32
+ "145a93knk5iwcvm51791wk72a22yrvf32plwc3apq4f4a2z2vklz"))))
+ (inputs (modify-inputs (package-inputs x-resize)
+ (append xdotool)))))