summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVineet Kumar <git@vineetk.net>2026-05-04 12:59:59 -0400
committerVineet Kumar <git@vineetk.net>2026-05-04 13:01:05 -0400
commit91efb01910e5cdeb12c562c208f8fe5bed521593 (patch)
tree675e53cbca26d939badf03ccb0839063466879da
parente8ecf0859bfd3571af5b1a6dd0d96bded7dbea71 (diff)
saklas: switch back to old vps for now
-rw-r--r--epistemia/systems/saklas.scm773
1 files changed, 388 insertions, 385 deletions
diff --git a/epistemia/systems/saklas.scm b/epistemia/systems/saklas.scm
index 16b52aa..84fb536 100644
--- a/epistemia/systems/saklas.scm
+++ b/epistemia/systems/saklas.scm
@@ -188,181 +188,184 @@ table inet filter {
188 188
189 189
190(operating-system 190(operating-system
191 (inherit base-system) 191 (inherit base-system)
192 (host-name "saklas.epistemia") 192 (host-name "saklas.epistemia")
193 193
194 (users (cons* (user-account 194 (users (cons* (user-account
195 (name "vin") 195 (name "vin")
196 (comment "Vineet") 196 (comment "Vineet")
197 (shell (file-append bash "/bin/bash")) 197 (shell (file-append bash "/bin/bash"))
198 (group "users") 198 (group "users")
199 (supplementary-groups '("wheel" "git" "torrents"))) 199 (supplementary-groups '("wheel" "git" "torrents")))
200 (user-account 200 (user-account
201 (name "git") 201 (name "git")
202 (comment "git account") 202 (comment "git account")
203 (group "git") 203 (group "git")
204 (shell (file-append git "/bin/git-shell")) 204 (shell (file-append git "/bin/git-shell"))
205 (home-directory "/data/src/bare") 205 (home-directory "/data/src/bare")
206 (system? #t)) 206 (system? #t))
207 (user-account 207 (user-account
208 (name "torrents") 208 (name "torrents")
209 (comment "torrenting account") 209 (comment "torrenting account")
210 (group "torrents") 210 (group "torrents")
211 (shell "/dev/null") 211 (shell "/dev/null")
212 (home-directory "/var/empty") 212 (home-directory "/var/empty")
213 (system? #t)) 213 (system? #t))
214 (user-account 214 (user-account
215 (name "vmail") 215 (name "vmail")
216 (comment "virtual mail account") 216 (comment "virtual mail account")
217 (group "vmail") 217 (group "vmail")
218 (shell "/dev/null") 218 (shell "/dev/null")
219 (home-directory "/var/vmail") 219 (home-directory "/var/vmail")
220 (system? #t)) 220 (system? #t))
221 %base-user-accounts)) 221 %base-user-accounts))
222 (groups (cons* (user-group 222 (groups (cons* (user-group
223 (name "git")) 223 (name "git"))
224 (user-group 224 (user-group
225 (name "torrents")) 225 (name "torrents"))
226 (user-group 226 (user-group
227 (name "vmail")) 227 (name "vmail"))
228 %base-groups)) 228 %base-groups))
229 229
230 (kernel linux-6.18) 230 (kernel linux-6.18)
231 (kernel-arguments (list "net.ifnames=0")) 231 (kernel-arguments (list "net.ifnames=0"))
232 (kernel-loadable-modules (list (list zfs-linux "module"))) 232 (kernel-loadable-modules (list (list zfs-linux "module")))
233 233
234 (initrd (lambda (file-systems . args) 234 (initrd (lambda (file-systems . args)
235 (apply microcode-initrd file-systems 235 (apply microcode-initrd file-systems
236 #:initrd epistemia-zfs-initrd 236 #:initrd epistemia-zfs-initrd
237 #:zfs-package zfs-linux 237 #:zfs-package zfs-linux
238 args))) 238 args)))
239 (firmware (cons* amdgpu-firmware %base-firmware)) 239 (firmware (cons* amdgpu-firmware %base-firmware))
240 240
241 (bootloader (bootloader-configuration 241 (bootloader (bootloader-configuration
242 (bootloader grub-zfs-bios) 242 (bootloader grub-zfs-bios)
243 (targets '("/dev/sda" 243 (targets '("/dev/sda"))))
244 "/dev/sdb"))))
245 244
246 (file-systems (append 245 (file-systems (append
247 (list (file-system 246 (list (file-system
248 (device "zroot/root") 247 (device "zroot/root")
249 (mount-point "/") 248 (mount-point "/")
250 (type "zfs") 249 (type "zfs")
251 (check? #f) 250 (check? #f)
252 (needed-for-boot? #t)) 251 (needed-for-boot? #t))
253 (file-system 252 (file-system
254 (device "zroot/gnu") 253 (device "zroot/gnu")
255 (mount-point "/gnu") 254 (mount-point "/gnu")
256 (type "zfs") 255 (type "zfs")
257 (check? #f) 256 (check? #f)
258 (needed-for-boot? #t)) 257 (needed-for-boot? #t))
259 (file-system 258 (file-system
260 (device "zroot/var") 259 (device "zroot/var")
261 (mount-point "/var") 260 (mount-point "/var")
262 (type "zfs") 261 (type "zfs")
263 (check? #f) 262 (check? #f)
264 (needed-for-boot? #t)) 263 (needed-for-boot? #t))
265 (file-system 264 (file-system
266 (device "zroot/home") 265 (device "zroot/home")
267 (mount-point "/home") 266 (mount-point "/home")
268 (type "zfs") 267 (type "zfs")
269 (check? #f) 268 (check? #f)
270 (needed-for-boot? #t))) 269 (needed-for-boot? #t))
271 %base-file-systems)) 270 (file-system
271 (device (uuid "0837-6658" 'fat))
272 (mount-point "/boot/efi")
273 (type "vfat")))
274 %base-file-systems))
272 275
273 (packages (append (list emacs-no-x 276 (packages (append (list emacs-no-x
274 git 277 git
275 zfs-linux) 278 zfs-linux)
276 %base-packages)) 279 %base-packages))
277 280
278 (services (modify-services (append (list (service age-secret-service-type 281 (services (modify-services (append (list (service age-secret-service-type
279 (age-secret-configuration 282 (age-secret-configuration
280 (secrets (list 283 (secrets (list
281 (age-secret 284 (age-secret
282 (name "wg1_saklas") 285 (name "wg1_saklas")
283 (file (local-file "../secrets/wg1_saklas.age"))) 286 (file (local-file "../secrets/wg1_saklas.age")))
284 (age-secret 287 (age-secret
285 (name "saklas_smtpd_dkim") 288 (name "saklas_smtpd_dkim")
286 (file (local-file "../secrets/saklas_smtpd_dkim.age")) 289 (file (local-file "../secrets/saklas_smtpd_dkim.age"))
287 (owner "smtpd") 290 (owner "smtpd")
288 (group "nogroup") 291 (group "nogroup")
289 (mode #o400)) 292 (mode #o400))
290 (age-secret 293 (age-secret
291 (name "saklas_smtpd_virtuals") 294 (name "saklas_smtpd_virtuals")
292 (file (local-file "../secrets/saklas_smtpd_virtuals.age")) 295 (file (local-file "../secrets/saklas_smtpd_virtuals.age"))
293 (owner "smtpd") 296 (owner "smtpd")
294 (group "nogroup") 297 (group "nogroup")
295 (mode #o400)) 298 (mode #o400))
296 (age-secret 299 (age-secret
297 (name "saklas_smtpd_passwd") 300 (name "saklas_smtpd_passwd")
298 (file (local-file "../secrets/saklas_smtpd_passwd.age")) 301 (file (local-file "../secrets/saklas_smtpd_passwd.age"))
299 (owner "smtpd") 302 (owner "smtpd")
300 (group "dovecot") 303 (group "dovecot")
301 (mode #o440)))))) 304 (mode #o440))))))
302 (simple-service 'zfs-loader 305 (simple-service 'zfs-loader
303 kernel-module-loader-service-type 306 kernel-module-loader-service-type
304 '("zfs")) 307 '("zfs"))
305 (simple-service 'zfs-shepherd-services 308 (simple-service 'zfs-shepherd-services
306 shepherd-root-service-type 309 shepherd-root-service-type
307 zfs-shepherd-services) 310 zfs-shepherd-services)
308 (simple-service 'zfs-shepherd-services-user-processes 311 (simple-service 'zfs-shepherd-services-user-processes
309 user-processes-service-type 312 user-processes-service-type
310 '(zfs-automount)) 313 '(zfs-automount))
311 (service nftables-service-type 314 (service nftables-service-type
312 (nftables-configuration 315 (nftables-configuration
313 (ruleset %nftables-ruleset))) 316 (ruleset %nftables-ruleset)))
314 (service static-networking-service-type 317 (service static-networking-service-type
315 (list (static-networking 318 (list (static-networking
316 (addresses 319 (addresses
317 (list (network-address 320 (list (network-address
318 (device "eth0") 321 (device "eth0")
319 (value "51.68.181.121/32")) 322 (value "157.180.125.215/32"))
320 (network-address 323 (network-address
321 (device "eth0") 324 (device "eth0")
322 (value "2001:41d0:700:1c79::1/128")))) 325 (value "2a01:4f9:c013:d07e::1/64"))))
323 (routes 326 (routes
324 (list (network-route 327 (list (network-route
325 (destination "default") 328 (destination "default")
326 (device "eth0") 329 (device "eth0")
327 (gateway "51.68.181.254")) 330 (gateway "172.31.1.1"))
328 (network-route 331 (network-route
329 (destination "default") 332 (destination "default")
330 (device "eth0") 333 (device "eth0")
331 (gateway "2001:41d0:0700:1cff:00ff:00ff:00ff:00ff"))))))) 334 (gateway "fe80::1")))))))
332 (simple-service 'resolv-configuration 335 (simple-service 'resolv-configuration
333 etc-service-type 336 etc-service-type
334 `(("resolv.conf" 337 `(("resolv.conf"
335 ,(plain-file "resolv.conf" 338 ,(plain-file "resolv.conf"
336 (string-append 339 (string-append
337 "nameserver 127.0.0.1\n" 340 "nameserver 127.0.0.1\n"
338 "search epistemia\n"))))) 341 "search epistemia\n")))))
339 (service (fail2ban-jail-service 342 (service (fail2ban-jail-service
340 openssh-service-type 343 openssh-service-type
341 (fail2ban-jail-configuration 344 (fail2ban-jail-configuration
342 (name "sshd") 345 (name "sshd")
343 (enabled? #t))) 346 (enabled? #t)))
344 (openssh-configuration 347 (openssh-configuration
345 (permit-root-login 'prohibit-password) 348 (permit-root-login 'prohibit-password)
346 (password-authentication? #f) 349 (password-authentication? #f)
347 (authorized-keys 350 (authorized-keys
348 `(("vin" ,(local-file "/data/ssh/id_ed25519.pub")) 351 `(("vin" ,(local-file "/data/ssh/id_ed25519.pub"))
349 ("git" ,(local-file "/data/ssh/id_ed25519.pub")) 352 ("git" ,(local-file "/data/ssh/id_ed25519.pub"))
350 ("root" ,(local-file "/data/ssh/id_ed25519.pub")))) 353 ("root" ,(local-file "/data/ssh/id_ed25519.pub"))))
351 (extra-content "\ 354 (extra-content "\
352 ListenAddress 127.0.0.1:22 355 ListenAddress 127.0.0.1:22
353 ListenAddress 51.68.181.121:22 356 ListenAddress 157.180.125.215:22
354 #ListenAddress 10.0.13.1:22 357 #ListenAddress 10.0.13.1:22
355 "))) 358 ")))
356 (service unbound-service-type 359 (service unbound-service-type
357 (unbound-configuration 360 (unbound-configuration
358 (server 361 (server
359 (unbound-server 362 (unbound-server
360 (interface '("127.0.0.1" 363 (interface '("127.0.0.1"
361 "::1" 364 "::1"
362 "10.0.13.1")) 365 "10.0.13.1"))
363 (hide-version #t) 366 (hide-version #t)
364 (hide-identity #t))) 367 (hide-identity #t)))
365 (extra-content "\ 368 (extra-content "\
366server: 369server:
367 access-control: 127.0.0.0/8 allow 370 access-control: 127.0.0.0/8 allow
368 access-control: 10.0.13.0/24 allow 371 access-control: 10.0.13.0/24 allow
@@ -392,224 +395,224 @@ rpz:
392 name: \"hagezi.ultimate\" 395 name: \"hagezi.ultimate\"
393 zonefile: \"hagezi.ultimate\" 396 zonefile: \"hagezi.ultimate\"
394 url: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/rpz/ultimate.txt"))) 397 url: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/rpz/ultimate.txt")))
395 (simple-service 'rtorrent 398 (simple-service 'rtorrent
396 shepherd-root-service-type 399 shepherd-root-service-type
397 (list 400 (list
398 (shepherd-service 401 (shepherd-service
399 (provision '(rtorrent)) 402 (provision '(rtorrent))
400 (requirement '(user-processes loopback syslogd)) 403 (requirement '(user-processes loopback syslogd))
401 (start #~(make-forkexec-constructor 404 (start #~(make-forkexec-constructor
402 (list #$(file-append rtorrent-xmlrpc "/bin/rtorrent") 405 (list #$(file-append rtorrent-xmlrpc "/bin/rtorrent")
403 "-n" 406 "-n"
404 "-b" "51.68.181.121" 407 "-b" "157.180.125.215"
405 "-p" "51413-51413" 408 "-p" "51413-51413"
406 "-d" "/data/torrents/complete/other" 409 "-d" "/data/torrents/complete/other"
407 "-s" "/data/torrents/rtorrent" 410 "-s" "/data/torrents/rtorrent"
408 "-o" (string-append "system.umask.set=0002," 411 "-o" (string-append "system.umask.set=0002,"
409 "dht.mode.set=disable," 412 "dht.mode.set=disable,"
410 "protocol.pex.set=no," 413 "protocol.pex.set=no,"
411 "network.scgi.open_port=10.0.13.1:5000," 414 "network.scgi.open_port=10.0.13.1:5000,"
412 "system.daemon.set=true")) 415 "system.daemon.set=true"))
413 #:user "torrents" #:group "torrents")) 416 #:user "torrents" #:group "torrents"))
414 (stop #~(make-kill-destructor)) 417 (stop #~(make-kill-destructor))
415 (documentation "Run rtorrent in headless mode (only xmlrpc).")))) 418 (documentation "Run rtorrent in headless mode (only xmlrpc)."))))
416 (service wireguard-service-type 419 (service wireguard-service-type
417 (wireguard-configuration 420 (wireguard-configuration
418 (interface "wg1") 421 (interface "wg1")
419 (addresses '("10.0.13.1/24" "fd00:b0ba:cafe:babe::1/64 ")) 422 (addresses '("10.0.13.1/24" "fd00:b0ba:cafe:babe::1/64 "))
420 (port 51820) 423 (port 51820)
421 (bootstrap-private-key? #f) 424 (bootstrap-private-key? #f)
422 (private-key "/run/secrets/wg1_saklas") 425 (private-key "/run/secrets/wg1_saklas")
423 (peers 426 (peers
424 (list 427 (list
425 (wireguard-peer 428 (wireguard-peer
426 (name "demiurge.epistemia") 429 (name "demiurge.epistemia")
427 (public-key "FMLvbSxY6vA8CRV4S1vl4+pMeCr/kR9n0G5w9buNqh4=") 430 (public-key "FMLvbSxY6vA8CRV4S1vl4+pMeCr/kR9n0G5w9buNqh4=")
428 (allowed-ips '("10.0.13.2/32" "fd00:b0ba:cafe:babe::2/128")) 431 (allowed-ips '("10.0.13.2/32" "fd00:b0ba:cafe:babe::2/128"))
429 (keep-alive 25)) 432 (keep-alive 25))
430 (wireguard-peer 433 (wireguard-peer
431 (name "hastur.epistemia") 434 (name "hastur.epistemia")
432 (public-key "1ketYziRhoUmpbrj/60O5DYbcPacvmEoFQqa/NntSnc=") 435 (public-key "1ketYziRhoUmpbrj/60O5DYbcPacvmEoFQqa/NntSnc=")
433 (allowed-ips '("10.0.13.3/32" "fd00:b0ba:cafe:babe::3/128")) 436 (allowed-ips '("10.0.13.3/32" "fd00:b0ba:cafe:babe::3/128"))
434 (keep-alive 25)) 437 (keep-alive 25))
435 (wireguard-peer 438 (wireguard-peer
436 (name "iphonebob.epistemia") 439 (name "iphonebob.epistemia")
437 (public-key "Xn0EmeRZdpMejBgzr98mYtb/2f5O58GAzQLNZV/SS30=") 440 (public-key "Xn0EmeRZdpMejBgzr98mYtb/2f5O58GAzQLNZV/SS30=")
438 (allowed-ips '("10.0.13.4/32" "fd00:b0ba:cafe:babe::4/128")) 441 (allowed-ips '("10.0.13.4/32" "fd00:b0ba:cafe:babe::4/128"))
439 (keep-alive 25)) 442 (keep-alive 25))
440 (wireguard-peer 443 (wireguard-peer
441 (name "lab.epistemia") 444 (name "lab.epistemia")
442 (public-key "iMDEwvXjPAlQH8ZCmP63FM5ICYIFIX5XIyGxjnXoNVE=") 445 (public-key "iMDEwvXjPAlQH8ZCmP63FM5ICYIFIX5XIyGxjnXoNVE=")
443 (allowed-ips '("10.0.13.5/32" "fd00:b0ba:cafe:babe::5/128")) 446 (allowed-ips '("10.0.13.5/32" "fd00:b0ba:cafe:babe::5/128"))
444 (keep-alive 25)))))) 447 (keep-alive 25))))))
445 (service certbot-service-type 448 (service certbot-service-type
446 (certbot-configuration 449 (certbot-configuration
447 (email "postmaster@vineetk.net") 450 (email "postmaster@vineetk.net")
448 (certificates 451 (certificates
449 (list 452 (list
450 (certificate-configuration 453 (certificate-configuration
451 (deploy-hook (program-file 454 (deploy-hook (program-file
452 "import-prosody-certs" 455 "import-prosody-certs"
453 #~(begin 456 #~(begin
454 (let ((prosodyctl (string-append #$prosody "/bin/prosodyctl"))) 457 (let ((prosodyctl (string-append #$prosody "/bin/prosodyctl")))
455 (system* prosodyctl "--root" "cert" "import" "/etc/certs"))))) 458 (system* prosodyctl "--root" "cert" "import" "/etc/certs")))))
456 (domains '("vineetk.net" 459 (domains '("vineetk.net"
457 "git.vineetk.net" 460 "git.vineetk.net"
458 "mail.vineetk.net" 461 "mail.vineetk.net"
459 "u.vineetk.net" 462 "u.vineetk.net"
460 "xmpp.vineetk.net" 463 "xmpp.vineetk.net"
461 ))) 464 )))
462 (certificate-configuration 465 (certificate-configuration
463 (domains '("13f0.net" 466 (domains '("13f0.net"
464 "m.13f0.net" 467 "m.13f0.net"
465 ;"snac.13f0.net" 468 ;"snac.13f0.net"
466 ))) 469 )))
467 (certificate-configuration 470 (certificate-configuration
468 (domains '("vinbiz.ca"))))))) 471 (domains '("vinbiz.ca")))))))
469 (service nginx-service-type 472 (service nginx-service-type
470 (nginx-configuration 473 (nginx-configuration
471 (server-blocks 474 (server-blocks
472 (list (nginx-server-configuration 475 (list (nginx-server-configuration
473 (server-name '("vineetk.net")) 476 (server-name '("vineetk.net"))
474 (listen '("443 ssl")) 477 (listen '("443 ssl"))
475 (ssl-certificate "/etc/certs/vineetk.net/fullchain.pem") 478 (ssl-certificate "/etc/certs/vineetk.net/fullchain.pem")
476 (ssl-certificate-key "/etc/certs/vineetk.net/privkey.pem") 479 (ssl-certificate-key "/etc/certs/vineetk.net/privkey.pem")
477 (root "/var/www/site_vineetk") 480 (root "/var/www/site_vineetk")
478 (raw-content (list "include " %nginx-badboi ";"))) 481 (raw-content (list "include " %nginx-badboi ";")))
479 (nginx-server-configuration 482 (nginx-server-configuration
480 (server-name '("13f0.net")) 483 (server-name '("13f0.net"))
481 (listen '("443 ssl")) 484 (listen '("443 ssl"))
482 (ssl-certificate "/etc/certs/13f0.net/fullchain.pem") 485 (ssl-certificate "/etc/certs/13f0.net/fullchain.pem")
483 (ssl-certificate-key "/etc/certs/13f0.net/privkey.pem") 486 (ssl-certificate-key "/etc/certs/13f0.net/privkey.pem")
484 (root "/var/www/site_13f0") 487 (root "/var/www/site_13f0")
485 (raw-content (list "include " %nginx-badboi ";"))) 488 (raw-content (list "include " %nginx-badboi ";")))
486 (nginx-server-configuration 489 (nginx-server-configuration
487 (server-name '("vinbiz.ca")) 490 (server-name '("vinbiz.ca"))
488 (listen '("443 ssl")) 491 (listen '("443 ssl"))
489 (ssl-certificate "/etc/certs/vinbiz.ca/fullchain.pem") 492 (ssl-certificate "/etc/certs/vinbiz.ca/fullchain.pem")
490 (ssl-certificate-key "/etc/certs/vinbiz.ca/privkey.pem") 493 (ssl-certificate-key "/etc/certs/vinbiz.ca/privkey.pem")
491 (root "/var/www/site_vinbiz") 494 (root "/var/www/site_vinbiz")
492 (raw-content (list "include " %nginx-badboi ";"))))))) 495 (raw-content (list "include " %nginx-badboi ";")))))))
493 ;; git folder needs to be readable by nginx/cgit, gets reset to 700 on reconfigure otherwise 496 ;; git folder needs to be readable by nginx/cgit, gets reset to 700 on reconfigure otherwise
494 (simple-service 'git-home-permissions 497 (simple-service 'git-home-permissions
495 activation-service-type 498 activation-service-type
496 #~(when (file-exists? "/data/src/bare") 499 #~(when (file-exists? "/data/src/bare")
497 (chmod "/data/src/bare" #o755))) 500 (chmod "/data/src/bare" #o755)))
498 (service cgit-service-type 501 (service cgit-service-type
499 (cgit-configuration 502 (cgit-configuration
500 (enable-index-links? #t) 503 (enable-index-links? #t)
501 (enable-log-filecount? #t) 504 (enable-log-filecount? #t)
502 (enable-log-linecount? #t) 505 (enable-log-linecount? #t)
503 (enable-git-config? #t) 506 (enable-git-config? #t)
504 (remove-suffix? #t) 507 (remove-suffix? #t)
505 (root-desc "") 508 (root-desc "")
506 (root-title "Vineet's git repos") 509 (root-title "Vineet's git repos")
507 (repository-directory "/data/src/bare") 510 (repository-directory "/data/src/bare")
508 (section-from-path 1) 511 (section-from-path 1)
509 (side-by-side-diffs? #t) 512 (side-by-side-diffs? #t)
510 (nginx 513 (nginx
511 (list 514 (list
512 (nginx-server-configuration 515 (nginx-server-configuration
513 (server-name '("git.vineetk.net")) 516 (server-name '("git.vineetk.net"))
514 (listen '("443 ssl")) 517 (listen '("443 ssl"))
515 (root cgit) 518 (root cgit)
516 (try-files (list "$uri" "@cgit")) 519 (try-files (list "$uri" "@cgit"))
517 (ssl-certificate "/etc/certs/vineetk.net/fullchain.pem") 520 (ssl-certificate "/etc/certs/vineetk.net/fullchain.pem")
518 (ssl-certificate-key "/etc/certs/vineetk.net/privkey.pem") 521 (ssl-certificate-key "/etc/certs/vineetk.net/privkey.pem")
519 (raw-content (list "include" %nginx-badboi ";")) 522 (raw-content (list "include" %nginx-badboi ";"))
520 (locations 523 (locations
521 (list 524 (list
522 (nginx-location-configuration 525 (nginx-location-configuration
523 (uri "@cgit") 526 (uri "@cgit")
524 (body '("fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi;" 527 (body '("fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi;"
525 "fastcgi_param PATH_INFO $uri;" 528 "fastcgi_param PATH_INFO $uri;"
526 "fastcgi_param QUERY_STRING $args;" 529 "fastcgi_param QUERY_STRING $args;"
527 "fastcgi_param HTTP_HOST $server_name;" 530 "fastcgi_param HTTP_HOST $server_name;"
528 "fastcgi_pass 127.0.0.1:9000;")))))))))) 531 "fastcgi_pass 127.0.0.1:9000;"))))))))))
529 (service prosody-service-type 532 (service prosody-service-type
530 (prosody-configuration 533 (prosody-configuration
531 (admins '("vin@vineetk.net")) 534 (admins '("vin@vineetk.net"))
532 (allow-registration? #f) 535 (allow-registration? #f)
533 (c2s-require-encryption? #t) 536 (c2s-require-encryption? #t)
534 (s2s-require-encryption? #t) 537 (s2s-require-encryption? #t)
535 (s2s-secure-auth? #t) 538 (s2s-secure-auth? #t)
536 (authentication "internal_hashed") 539 (authentication "internal_hashed")
537 (plugin-paths (list prosody-cloud-notify)) 540 (plugin-paths (list prosody-cloud-notify))
538 (modules-enabled 541 (modules-enabled
539 ;; list from https://github.com/monal-im/Monal/wiki/Considerations-for-XMPP-server-admins#prosody 542 ;; list from https://github.com/monal-im/Monal/wiki/Considerations-for-XMPP-server-admins#prosody
540 (cons* "sasl_ssdp" 543 (cons* "sasl_ssdp"
541 ;; TODO update prosody to 13 544 ;; TODO update prosody to 13
542 ;; "sasl2" 545 ;; "sasl2"
543 ;; "sasl2_bind2" 546 ;; "sasl2_bind2"
544 ;; "sasl2_sm" 547 ;; "sasl2_sm"
545 ;; "sasl2_fast" 548 ;; "sasl2_fast"
546 "muc_notifications" 549 "muc_notifications"
547 "smacks" 550 "smacks"
548 "mam" 551 "mam"
549 "csi_simple" 552 "csi_simple"
550 "cloud_notify" 553 "cloud_notify"
551 "bookmarks" 554 "bookmarks"
552 %default-modules-enabled)) 555 %default-modules-enabled))
553 ;; I don't want my syslog flooded. can't control changes either in service yet 556 ;; I don't want my syslog flooded. can't control changes either in service yet
554 (log "/var/lib/prosody/prosody.log") 557 (log "/var/lib/prosody/prosody.log")
555 (virtualhosts 558 (virtualhosts
556 (list 559 (list
557 (virtualhost-configuration 560 (virtualhost-configuration
558 (domain "vineetk.net")))))) 561 (domain "vineetk.net"))))))
559 (service opensmtpd-service-type 562 (service opensmtpd-service-type
560 (opensmtpd-configuration 563 (opensmtpd-configuration
561 (config-file %opensmtpd-config))) 564 (config-file %opensmtpd-config)))
562 (service dovecot-service-type 565 (service dovecot-service-type
563 (dovecot-configuration 566 (dovecot-configuration
564 (listen '("*" "::")) 567 (listen '("*" "::"))
565 (mail-location "maildir:/var/vmail/%d/%n") 568 (mail-location "maildir:/var/vmail/%d/%n")
566 (mail-uid "vmail") 569 (mail-uid "vmail")
567 (mail-gid "vmail") 570 (mail-gid "vmail")
568 (ssl? "required") 571 (ssl? "required")
569 (ssl-cert "</etc/certs/vineetk.net/fullchain.pem") 572 (ssl-cert "</etc/certs/vineetk.net/fullchain.pem")
570 (ssl-key "</etc/certs/vineetk.net/privkey.pem") 573 (ssl-key "</etc/certs/vineetk.net/privkey.pem")
571 (namespaces 574 (namespaces
572 (list (namespace-configuration 575 (list (namespace-configuration
573 (name "inbox") 576 (name "inbox")
574 (inbox? #t) 577 (inbox? #t)
575 (location "") 578 (location "")
576 (prefix "") 579 (prefix "")
577 (mailboxes 580 (mailboxes
578 (list (mailbox-configuration 581 (list (mailbox-configuration
579 (name "Drafts") 582 (name "Drafts")
580 (special-use '("\\Drafts"))) 583 (special-use '("\\Drafts")))
581 (mailbox-configuration 584 (mailbox-configuration
582 (name "Junk") 585 (name "Junk")
583 (special-use '("\\Junk"))) 586 (special-use '("\\Junk")))
584 (mailbox-configuration 587 (mailbox-configuration
585 (name "Sent") 588 (name "Sent")
586 (special-use '("\\Sent"))) 589 (special-use '("\\Sent")))
587 (mailbox-configuration 590 (mailbox-configuration
588 (name "Trash") 591 (name "Trash")
589 (special-use '("\\Trash")))))))) 592 (special-use '("\\Trash"))))))))
590 (passdbs 593 (passdbs
591 (list (passdb-configuration 594 (list (passdb-configuration
592 (driver "passwd-file") 595 (driver "passwd-file")
593 (args '("scheme=CRYPT" "username_format=%u" "/run/secrets/saklas_smtpd_passwd"))))) 596 (args '("scheme=CRYPT" "username_format=%u" "/run/secrets/saklas_smtpd_passwd")))))
594 (userdbs 597 (userdbs
595 (list (userdb-configuration 598 (list (userdb-configuration
596 (driver "static") 599 (driver "static")
597 (args '("uid=vmail" "gid=vmail" "home=/var/vmail/%d/%n"))))) 600 (args '("uid=vmail" "gid=vmail" "home=/var/vmail/%d/%n")))))
598 (protocols 601 (protocols
599 (list (protocol-configuration (name "imap")) 602 (list (protocol-configuration (name "imap"))
600 (protocol-configuration (name "lmtp")))) 603 (protocol-configuration (name "lmtp"))))
601 (services 604 (services
602 (list (service-configuration 605 (list (service-configuration
603 (kind "lmtp") 606 (kind "lmtp")
604 (listeners 607 (listeners
605 (list (unix-listener-configuration 608 (list (unix-listener-configuration
606 (path "lmtp") 609 (path "lmtp")
607 (group "vmail") 610 (group "vmail")
608 (user "vmail")))))))))) 611 (user "vmail"))))))))))
609 %base-services) 612 %base-services)
610 (guix-service-type config => 613 (guix-service-type config =>
611 (guix-configuration 614 (guix-configuration
612 (inherit config) 615 (inherit config)
613 (authorized-keys 616 (authorized-keys
614 (append (list (local-file "../../demiurge.pub")) 617 (append (list (local-file "../../demiurge.pub"))
615 %default-authorized-guix-keys))))))) 618 %default-authorized-guix-keys)))))))