-
Notifications
You must be signed in to change notification settings - Fork 1
/
E5400_config.scm
155 lines (138 loc) · 6.06 KB
/
E5400_config.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
(define-module (E5400_config))
(use-modules (guix store)
(guix gexp)
(gnu)
(gnu system locale)
(config filesystems)
(config guix-daemon)
(srfi srfi-1))
(use-service-modules
cups
desktop
linux
mcron
networking
ssh
xorg)
(use-package-modules
cups
fonts
gnome
linux
pulseaudio)
(operating-system
(host-name "E5400")
(timezone "Asia/Jerusalem")
(locale "en_US.UTF-8")
(locale-definitions
(list (locale-definition (source "en_US")
(name "en_US.UTF-8"))
(locale-definition (source "he_IL")
(name "he_IL.UTF-8"))))
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(targets '("/dev/sda" "/dev/sdb" "/dev/sdc"))))
(file-systems (cons* (file-system
(device (file-system-label "root"))
(mount-point "/")
(type "btrfs")
(options "compress=zstd,discard,ssd_spread,space_cache=v2"))
(file-system
(device (file-system-label "data"))
(mount-point "/data")
(mount-may-fail? #t)
(type "btrfs")
(options "compress=zstd,space_cache=v2"))
%guix-temproots
%base-file-systems))
(swap-devices
(list (swap-space
(priority 50)
(target (uuid "66e10e64-e066-4c77-9ce7-63198f98aa88")))))
(users (cons* (user-account
(name "efraim")
(comment "Efraim")
(group "users")
(supplementary-groups '("wheel" "netdev" "kvm"
"lp" "lpadmin"
"audio" "video"))
(home-directory "/home/efraim"))
(user-account
(name "kids")
(comment "both kids")
(group "users")
(supplementary-groups '("netdev"
"audio" "video"))
(home-directory "/home/kids"))
%base-user-accounts))
;; This is where we specify system-wide packages.
(packages (cons* gvfs ;for user mounts
pavucontrol
btrfs-progs compsize
font-terminus font-dejavu
font-opendyslexic
%base-packages))
(services (cons* (service xfce-desktop-service-type)
(service guix-publish-service-type
(guix-publish-configuration
(host "0.0.0.0")
(port 3000)
(advertise? #t)))
(service openssh-service-type
(openssh-configuration
(password-authentication? #t)))
(service tor-service-type
(tor-configuration
(hidden-services
(list
(tor-onion-service-configuration
(name "ssh")
(mapping '((22 "127.0.0.1:22"))))
(tor-onion-service-configuration
(name "guix-publish")
;; jlcmm5lblot62p4txmplf66d76bsrfs4ilhcwaswjdulf6htvntxztad.onion
(mapping '((3000 "127.0.0.1:3000"))))))))
(service cups-service-type
(cups-configuration
(web-interface? #t)
(default-paper-size "A4")
(extensions
(list cups-filters hplip-minimal))))
(service mcron-service-type
(mcron-configuration
(jobs (append (%btrfs-maintenance-jobs "/")
(%btrfs-maintenance-jobs "/data")))))
(service openntpd-service-type
(openntpd-configuration
(listen-on '("127.0.0.1" "::1"))
(constraints-from '("https://www.google.com/"))))
(service earlyoom-service-type
(earlyoom-configuration
(prefer-regexp "(cc1(plus)?|.rustc-real|ghc|Web Content)")
(avoid-regexp "xfce")))
(service zram-device-service-type
(zram-device-configuration
(size (* 2 (expt 2 30)))
(compression-algorithm 'zstd)
(priority 100)))
(service slim-service-type)
(remove (lambda (service)
(let ((type (service-kind service)))
(or (memq type
(list
gdm-service-type
ntp-service-type)))))
(modify-services
%desktop-services
(guix-service-type
config =>
(guix-configuration
(inherit config)
;; Rely on btrfs compression.
(log-compression 'none)
(discover? #t)
(substitute-urls %substitute-urls)
(authorized-keys %authorized-keys)
(extra-options %extra-options)))))))
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))