-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.scm
231 lines (222 loc) · 9.43 KB
/
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
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
;; This is an operating system configuration generated
;; by the graphical installer.
;;
;; Once installation is complete, you can learn and modify
;; this file to tweak the system configuration, and pass it
;; to the 'guix system reconfigure' command to effect your
;; changes.
;; Indicate which modules to import to access the variables
;; used in this configuration.
(use-modules
(gnu)
(gnu packages package-management)
(gnu packages bash)
(gnu packages admin)
(gnu packages lisp-xyz)
(gnu packages rust-apps)
(gnu packages wm)
(gnu services shepherd)
(nongnu packages linux)
(nongnu packages firmware)
(nongnu system linux-initrd)
(srfi srfi-1)
(btv tailscale)
(guix inferior)
(guix channels))
(use-package-modules
curl
docker
emacs
fonts
lisp
version-control
wm)
(use-service-modules
cups
databases
desktop
docker
networking
ssh
xorg)
(operating-system
(kernel
;; https://github.com/nonguix/nonguix#pinning-package-versions
;;
;; When using substitutes is not an option, you may find that guix
;; system reconfigure recompiles the kernel frequently due to
;; version bumps in the kernel package. An inferior can be used to
;; pin the kernel version and avoid lengthy rebuilds.
(let*
((channels
(list (channel
(name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix")
(commit "e355a2ff675abd48f671a867c211c98707ca1e82"))
(channel
(name 'guix)
(url "https://git.savannah.gnu.org/git/guix.git")
(commit "b8fd792ea267cb920da0651074a533d8abf00488"))))
(inferior
(inferior-for-channels channels)))
(first (lookup-inferior-packages inferior "linux" "6.10.13")))
;;
;; linux
)
(initrd microcode-initrd)
;; includes iwlwifi, intel microcode
(firmware (list linux-firmware))
(locale "en_IN.utf8")
(timezone "Asia/Kolkata")
(keyboard-layout (keyboard-layout "us" "altgr-intl"))
(host-name "nabeel")
;; The list of user accounts ('root' is implicit).
(users (cons* (user-account
(name "nabeel")
(comment "Nabeel Javed")
(group "users")
(home-directory "/home/nabeel")
(shell (file-append bash "/bin/bash"))
(supplementary-groups '("wheel" ;allow use of sudo, etc.
"tty"
"netdev"
"lp" ;Users need to be in the lp group to access the D-Bus service, like bluetooth.
"audio" ;sound card
"video" ;video devices such as webcams
"input"
"docker"
)))
%base-user-accounts))
;; Packages installed system-wide. Users can also install packages
;; under their own account: use 'guix search KEYWORD' to search
;; for packages and 'guix install PACKAGE' to install a package.
(packages (append (list curl
;; docker
docker-cli
docker-compose
;;
emacs
font-dejavu
font-fira-code
git
python
python-setuptools
;; sway
;; swaylock-effects
;; swaybg
;; swayidle
;; waybar
tailscale
;; stumpwm
sbcl
(specification->package "stumpwm-with-slynk")
i3lock
;; sbcl-slynk
;; `(,stumpwm "lib")
;; sbcl-stumpwm-ttf-fonts
xremap-x11
)
%base-packages))
;; Below is the list of system services. To search for available
;; services, run 'guix system search KEYWORD' in a terminal.
(services
(append (list (service gnome-desktop-service-type)
;; To configure OpenSSH, pass an 'openssh-configuration'
;; record as a second argument to 'service' below.
(service openssh-service-type
(openssh-configuration
;; Currently the default is #t but it's considered
;; unsafe. Explicitly pass #f.
(password-authentication? #f)))
(service bluetooth-service-type
(bluetooth-configuration
(auto-enable? #t)))
(service cups-service-type)
(service docker-service-type)
;; Have to manually add containerd service to use in docker.
;; https://lists.nongnu.org/archive/html/guix-patches/2024-06/msg00177.html
(service containerd-service-type)
(set-xorg-configuration
(xorg-configuration (keyboard-layout keyboard-layout)))
(service screen-locker-service-type
(screen-locker-configuration
(name "swaylock")
(program (file-append swaylock "bin/swaylock"))
(using-pam? #t)
(using-setuid? #f)))
(service screen-locker-service-type
(screen-locker-configuration
(name "i3lock")
(program (file-append swaylock "bin/i3lock"))
(using-pam? #t)
(using-setuid? #f)))
(service mysql-service-type)
(service tailscale-service-type)
;; Add a uinput udev rule so that Xremap can run without root
;; permissions.
;; https://github.com/xremap/xremap?tab=readme-ov-file#running-xremap-without-sudo
(udev-rules-service 'uinput
(udev-rule
"input.rules"
"KERNEL==\"uinput\", GROUP=\"input\", TAG+=\"uaccess\""))
(simple-service 'xremap-service
shepherd-root-service-type
(list (shepherd-service
(provision '(xremap))
(requirement '())
(start #~(make-forkexec-constructor
(list #$(file-append xremap-x11
"/bin/xremap"
"--watch=config"
"--watch=device"
"/etc/xremap.yaml"))))
(stop #~(make-kill-destructor)))))
)
;; This is the default list of services we
;; are appending to.
(modify-services %desktop-services
;; enable wayland for gdm, gnome
(gdm-service-type config =>
(gdm-configuration
(inherit config)
(wayland? #f)))
(elogind-service-type
config =>
(elogind-configuration
(inherit config)
(handle-power-key 'suspend)))
;; enable substitute for nonguix - should help with large package eg: linux, firefox
(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
"./signing-key.pub"))
%default-authorized-guix-keys)))))))
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(targets (list "/boot/efi"))
(keyboard-layout keyboard-layout)))
(swap-devices (list (swap-space
(target (uuid
"b1411533-b4e5-4f41-8bc4-cce90b425870")))))
;; The list of file systems that get "mounted". The unique
;; file system identifiers there ("UUIDs") can be obtained
;; by running 'blkid' in a terminal.
(file-systems (cons* (file-system
(mount-point "/boot/efi")
(device (uuid "19EA-A6BA"
'fat32))
(type "vfat"))
(file-system
(mount-point "/")
(device (uuid
"b54d30b2-e4fe-4385-8518-cca7a28746ab"
'ext4))
(type "ext4")) %base-file-systems)))