-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_efi_wayland.scm
448 lines (437 loc) · 13.7 KB
/
config_efi_wayland.scm
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce where the
;; root partition is encrypted with LUKS.
(use-modules
(gnu)
(gnu system nss) ; nameservice switch
(guix build-system gnu)
(guix build-system haskell)
(guix build utils)
(guix gexp)
(guix modules)
(guix packages)
(guix store)
(srfi srfi-1) ; for remove function "alist-delete"
(srfi srfi-26)
(ice-9 ftw)
(guix monads))
(use-service-modules
admin
audio
base
cups
dbus
desktop
mcron
networking
sddm
ssh
web
xorg ; contained in service-module desktop if using that
)
(use-package-modules
abduco
admin
algebra ; for bc package
autotools
bash
base
certs ; https etc.
commencement ; gcc-toolchain
compression
compton
conkeror
cryptsetup
curl
databases ; recsel command
disk
display-managers ;; sddm
dns ; dnsmasq for virtualization
dvtm ;; terminal dynamic window manager
emacs
enlightenment
file
flashing-tools ; for flashrom to configure grub in libreboot.
fonts
fontutils
freedesktop ; xdg-utils, wayland
gawk
;geiser
ghostscript
;git
gl ; for mesa and mesa-utils
glib
gnome
gnupg ; https etc
gnuzilla
graphviz
gtk
guile
haskell
image-viewers
irc
java
javascript
;; Terminal & Console
linux ; inotify-tools
libreoffice
lisp
;; Utils
mail
messaging ; for qtox and gajim
mpd
mtools
ncurses
pkg-config
;; Desktop & Office
pdf
perl
;; Messaging
;; Audio & Video
pulseaudio ; pavucontrol
;;pulseaudio-alsa
python
;; databases web php for mariadb nginx and php respectively.
;; Virtualization
rsync
ruby
screen
shells
ssh
suckless ; suckless for dmenu and more
terminals
texinfo
text-editors ;; for vis package
time ; time is for python2-dateutil
tls ; for gnutls etc.
version-control
virtualization
video ; ffmpeg mpv youtube-dl
vpn
web-browsers
wicd
wget
wm ; ghc-xmonad-contrib
spice
xdisorg
xfce
xiph ; vorbis-tools
xorg
)
(define updatedb-job
;; Run 'updatedb' at 3AM every day. Here we write the
;; job's action as a Scheme procedure.
#~(job '(next-hour '(3))
(lambda ()
(execl (string-append #$findutils "/bin/updatedb")
"updatedb"
"--prunepaths=/tmp /var/tmp /gnu/store"))))
(define garbage-collector-job
;; Collect garbage 5 minutes after midnight every day.
;; The job's action is a shell command.
#~(job "5 0 * * *" ;Vixie cron syntax
"guix gc -F 1G"))
;(define my-screenlocker
; #~(job "0 0 0 0 5"
; "
(operating-system
(host-name "server1")
(timezone "Europe/Stockholm")
(locale "en_US.UTF-8")
;; Assuming /dev/sdX is the target hard disk, and "my-root"
;; is the label of the target root file system.
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(target "/boot/efi"))) ; create /mnt/boot/efi and mount efi partition there during guix system init
;; Specify a mapped device for the encrypted root partition.
;; The UUID is that returned by 'cryptsetup luksUUID'.
(mapped-devices
(list (mapped-device
(source "/dev/sda2")
(target "fs_root")
(type luks-device-mapping))))
(file-systems (cons* (file-system
(device "/dev/mapper/fs_root")
(title 'device)
(mount-point "/")
(type "btrfs")
(needed-for-boot? #t)
(dependencies mapped-devices))
(file-system
(device "/dev/sda1")
(mount-point "/boot/efi")
(type "vfat"))
%base-file-systems))
(initrd (lambda (file-systems . rest)
(apply base-initrd file-systems
#:extra-modules '("btrfs")
rest)))
(kernel-arguments '("modprobe.blacklist=pcspkr,snd_pcsp"))
(users (cons (user-account
(name "user1")
(comment "user1")
(group "users")
(supplementary-groups '("wheel" "netdev"
"audio" "video"
"kvm" "lp"))
(home-directory "/home/user1"))
%base-user-accounts))
;; This is where we specify system-wide packages.
(packages (cons*
;; Utils
abduco
alpine
alsa-lib
alsa-plugins
alsa-utils ;; Audio & Video
arandr
autoconf
automake
autobuild ; autotools
bash-completion
bc
beep
binutils ; base
bridge-utils ; virtualization, brctl
btrfs-progs
;;bzip2 ; "conflicting entry"
byobu ;; screen enhanced
cl-stumpwm
compton
conkeror
cpulimit
cryptsetup ; mounting various file-systems etc
dconf-editor
dnsmasq ; virtualization
dmenu
dvtm
dzen
curl
;; Office
emacs
emacs-guix
emacs-nginx-mode
emacs-scheme-complete
emacs-pdf-tools
emacs-rudel
emacs-wget
emacs-lispy
;;emacs-org-contrib ; text-editing, temporarily disabled
exfat-utils
enlightenment
fbcat
fuse
fuse-exfat
;; diffutils
file ; findutils
flashrom ; admin tools
fbida ; framebuffer graphics
ffmpeg ;; Audio fromat converter
flac ;; flac audio format
;font-abattis-cantarell
font-anonymous-pro
font-awesome
font-bitstream-vera
font-dejavu
font-fantasque-sans
font-fira-mono
font-gnu-freefont-ttf
font-gnu-unifont
font-go
font-google-material-design-icons
font-google-noto
font-google-roboto
font-hack
font-inconsolata
font-liberation
;font-linux-libertine
font-mathjax
font-rachana
font-tamzen
font-terminus
font-tex-gyre
font-ubuntu
font-un
font-util
fontconfig
ftgl
;font-mutt-misc
feh
geiser
git
gnome-tweak-tool
gnupg ;for HTTPS access
gnu-make
gnutls
;;guile2.2-gnutls
;;guile2.2-json
gpgme
graphviz ; pdf tools
gs-fonts
gvfs ; user mounts
ghc-x11-xft
gcc-toolchain ; xmonad
ghc-xmonad-contrib
ghc
ghc-network
glib
glibc-locales
glibc-utf8-locales ; locales
;;gtk2fontsel
gsettings-desktop-schemas
htop
iptables ; firewall, used for virtualization also
icecat ; browser
icedtea ; browser plugin
;; enlightenment
gajim ; xmpp
gtk+
gtkglext
kbd
libgcrypt ; for compiling alock with something (see my-xmonad.sh)
;;libreoffice ; office suite
libnotify
libtool
libxft ; xft fonts
libxfont ; xmonad
linux-pam ; for compiling alock with --enable-pam module
ltrace
lynx
mpv ; Video-player
mcron ; Schedule commands
mesa
mesa-utils
mtools
mupdf ; pdf tools
mpd ; music player daemon
mpd-mpc ; cli for mpd
ncmpcpp ; mpd music daemon, mpd cli, and mpd-client.
ncurses ; terminal menus written in C
nss-certs ; certificates
net-tools
nmap ; check ports etc. - network tool
;; Virtualization
openvpn ; virtualization, mktun
openssh ; SSH access
pinentry
pinentry-tty
pinentry-qt
;;pinentry-gtk
pulseaudio
ponymix
pavucontrol
perl
python-3.6
;;python-2.7
python2-dateutil
python2-vobject ;;python
paredit ; programming tools
pavucontrol ;; Audio & Video
pkg-config
qemu
qtox ; tox
recutils ; location: databases
rxvt-unicode
rsync ; rsync
screen
sddm
setxkbmap
spice ; virtualization
sshfs-fuse
; tar ; "conflicting entry"
terminology ; terminals
termite ;; wayland-native terminal
texinfo
tree; terminal and console
unclutter
unzip
vis
; util-linux, disabled due to "conflicting entries"
vorbis-tools ;; Audio & Video
wayland
weechat
wicd
wget
wpa-supplicant
;; Desktop
xauth
xbacklight
xclip
xdg-utils
xdotool; xmonad window manager related
xfce4-pulseaudio-plugin ;; Audio & Video
xf86-video-qxl
xf86-video-fbdev
xinit
xkill
xlsfonts ; font
xmodmap
xmonad ;
; xmobar ; xmonad
xorg-server
;xorg-xfontsel ; font
xrandr
xscreensaver
xsensors
xset ; xorg display server related
xsetroot
youtube-dl ;; Audio & Video
zip
%base-packages))
;; Server stack
; mariadb nginx php letsencrypt
;; Using the "desktop" services includes
;; the X11 log-in service, networking with Wicd, and more.
(services (cons*
(gnome-desktop-service)
(xfce-desktop-service)
(console-keymap-service "sv-latin1")
;;(slim-service) ; login screen
(sddm-service (sddm-configuration
(display-server "wayland")))
(service cups-service-type
(cups-configuration
(web-interface? #t)
(log-level 'debug2)))
;;(dhcp-client-service)
;(remove (lambda (service)
; (eq? (service-kind service) wicd-service-type))
(service mpd-service-type
(mpd-configuration
(user "user1")
(port "6666")))
(gpm-service)
(screen-locker-service slock "slock")
(service mcron-service-type)
;; (lsh-service #:port-number 2222)
(service openssh-service-type
(openssh-configuration
(port-number 2222)
(x11-forwarding? #t)
))
(mcron-service (list garbage-collector-job
updatedb-job))
(service nginx-service-type
(nginx-configuration
(server-blocks
(list (nginx-server-configuration
(server-name '("localhost"))
(root "/srv/http/localhost")
)))))
;;(wicd-service) ; network service ;; provided by %desktop-services
(service network-manager-service-type (network-manager-configuration))
(dbus-service) ; IPC or Inter-Process-Communication. ;; provided by %desktop-services
(service wpa-supplicant-service-type wpa-supplicant)
(udisks-service) ;; provided by %desktop-services
(upower-service) ;; provided by %desktop-services
(colord-service) ;; provided by %desktop-services
(bluetooth-service) ;; provided by %desktop-services
(geoclue-service) ;; provided by %desktop-services
(polkit-service) ;; ;; provided by %desktop-services
(accountsservice-service) ;; provided by %desktop-services
(elogind-service #: config (elogind-configuration (handle-lid-switch 'ignore))) ;; provided by %desktop-services
(ntp-service #:allow-large-adjustment? #t) ;; network time protocol ;; provided by %desktop-services
%base-services )) ; desktop services provide lots of default services.
;; %desktop-services )) ; desktop services provide lots of default services.
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))