blob: f335d62d704429f4a4b772278b790e4ceb29de61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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"))))))
|