aboutsummaryrefslogtreecommitdiffstats
path: root/oni/home/config/rincewind.scm
blob: e4f3f2ec35cb680e801e032493c6020d22e7206c (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
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
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
(define-module (oni home config rincewind)
  #:use-module ((gnu home)
                #:select (home-environment))
  #:use-module ((gnu home services mail)
                #:select (home-msmtp-service-type
                          home-msmtp-configuration
                          msmtp-configuration
                          msmtp-account))
  #:use-module ((gnu home services guix)
                #:select (home-channels-service-type))
  #:use-module ((gnu home services gnupg)
                #:select (home-gpg-agent-service-type
                          home-gpg-agent-configuration))
  #:use-module ((gnu home services ssh)
                #:select (home-ssh-agent-service-type))
  #:use-module ((gnu packages certs)
                #:select (nss-certs))
  #:use-module ((gnu packages cdrom)
                #:select (abcde))
  #:use-module ((gnu packages databases)
                #:select (recutils
                          emacs-rec-mode))
  #:use-module ((gnu packages emacs)
                #:select (emacs-next-tree-sitter))
  #:use-module ((gnu packages emacs-xyz)
                #:select (emacs-org-roam
                          emacs-guix
                          emacs-org-contacts
                          emacs-fennel-mode))
  #:use-module ((gnu packages file-systems)
                #:select (tmsu))
  #:use-module ((gnu packages forth)
                #:select (gforth))
  #:use-module ((gnu packages gnome)
                #:select (hicolor-icon-theme))
  #:use-module ((gnu packages linux)
                #:select (fakeroot))
  #:use-module ((gnu packages mail)
                #:select (notmuch
                          emacs-notmuch))
  #:use-module ((gnu packages music)
                #:select (easytag))
  #:use-module ((gnu packages tree-sitter)
                #:select (tree-sitter-bash
                          tree-sitter-scheme
                          tree-sitter-python
                          tree-sitter-org
                          tree-sitter-json
                          tree-sitter-css))
  #:use-module ((gnu packages)
                #:select (specification->package+output))
  #:use-module ((gnu services)
                #:select (service
                          simple-service))
  #:use-module ((guix channels)
                #:select (channel
                          make-channel-introduction
                          openpgp-fingerprint))
  #:use-module ((guix gexp)
                #:select (local-file
                          mixed-text-file))
  #:use-module ((guix packages)
                #:select (package-name
                          package-input-rewriting))
  #:use-module ((guix transformations)
                #:select (options->transformation))
  #:use-module ((nongnu packages emacs)
                #:select (emacs-org-roam-ui))
  #:use-module ((oni home config common)
                #:select (home-redshift-service
                          ;; home-xbindkeys-service
                          home-zsh-service
                          home-guile-service
                          home-xmodmap-service
                          home-openssh-service
                          home-kitty-service))
  #:use-module ((oni home services autokey)
                #:select (home-autokey-service-type))
  #:use-module ((oni home services copyq)
                #:select (home-copyq-service-type))
  #:use-module ((oni home services dunst)
                #:select (home-dunst-default-service))
  #:use-module ((oni home services emacs)
                #:select (home-emacs-service-type
                          home-emacs-configuration
                          home-emacs-helpful-service-type
                          home-emacs-helpful-configuration
                          home-emacs-yasnippet-capf-service-type
                          home-emacs-dashboard-service-type
                          home-emacs-dashboard-configuration
                          home-emacs-eros-service-type
                          home-emacs-ace-link-service-type
                          home-emacs-ace-link-configuration
                          home-emacs-ace-link-notmuch-service-type
                          home-emacs-ace-link-notmuch-configuration
                          home-emacs-golden-ratio-service-type
                          home-emacs-pinentry-service-type
                          home-emacs-vterm-service-type
                          home-emacs-vterm-configuration
                          home-emacs-org-modern-service-type))
  #:use-module ((oni home services environment)
                #:select (home-environment-service))
  #:use-module ((oni home services flameshot)
                #:select (home-flameshot-service-type))
  #:use-module ((oni home services kdeconnect)
                #:select (home-kdeconnect-service-type))
  #:use-module ((oni home services mpd)
                #:select (home-mpd-service-type
                          home-mpd-configuration
                          <home-mpd-audio-output>
                          home-mpc-update-service-type
                          home-mpd-notify-service-type))
  #:use-module ((oni home services mpv)
                #:select (home-mpv-service-type
                          home-mpv-mpris-service-type))
  #:use-module ((oni home services notmuch)
                #:select (home-notmuch-service-type
                          home-notmuch-configuration))
  #:use-module ((oni home services picom)
                #:select (home-picom-service-type
                          home-picom-configuration))
  #:use-module ((oni home services polybar)
                #:select (home-polybar-service-type
                          home-polybar-configuration))
  #:use-module ((oni home services rofi)
                #:select (home-rofi-default-service))
  #:use-module ((oni home services stumpwm)
                #:select (home-stumpwm-service-type
                          home-stumpwm-configuration
                          home-stumpwm-gaps-service-type
                          home-stumpwm-gaps-configuration
                          home-stumpwm-stumptray-service-type
                          home-stumpwm-stumptray-configuration))
  #:use-module ((oni home services syncthing)
                #:select (home-syncthing-service-type))
  #:use-module ((oni home services utilities)
                #:select (home-inkplate-display-service-type))
  #:use-module ((oni home services zsh)
                #:select (home-zsh-syntax-highlighting-service-type
                          home-zsh-autosuggestions-service-type
                          home-zsh-autopair-service-type))
  #:use-module ((oni packages count-emails)
                #:select (count-emails))
  #:use-module ((oni packages emacs)
                #:select (emacs-inkplate
                          emacs-outli
                          emacs-syncthing-status
                          emacs-nginx-mode))
  #:use-module ((oni packages emacs-config)
                #:select (emacs-oni-org-roam
                          emacs-oni-elfeed
                          emacs-oni-elisp
                          emacs-oni-eshell
                          emacs-oni-core
                          emacs-oni-compilation
                          emacs-oni-common-lisp
                          emacs-oni-gui
                          emacs-oni-magit
                          emacs-oni-notmuch
                          emacs-oni-hy
                          emacs-oni-project
                          emacs-oni-bookmark
                          emacs-oni-dired
                          emacs-oni-browse-url
                          emacs-oni-c
                          emacs-oni-circe
                          emacs-oni-clojure
                          emacs-oni-cmake
                          emacs-oni-conf
                          emacs-oni-cpp
                          emacs-oni-csharp
                          emacs-oni-css
                          emacs-oni-diff-hl
                          emacs-oni-ediff
                          emacs-oni-elm
                          emacs-oni-emms
                          emacs-oni-epub
                          emacs-oni-eww
                          emacs-oni-grep
                          emacs-oni-haskell
                          emacs-oni-highlight-indent-guides
                          emacs-oni-html
                          emacs-oni-java
                          emacs-oni-json
                          emacs-oni-log-edit
                          emacs-oni-lua
                          emacs-oni-makefile
                          emacs-oni-nxml
                          emacs-oni-package
                          emacs-oni-projectile
                          emacs-oni-scheme
                          emacs-oni-sh
                          emacs-oni-shr
                          emacs-oni-tramp
                          emacs-oni-embrace
                          emacs-oni-yaml
                          emacs-oni-python
                          emacs-oni-git-commit))
  #:use-module ((oni packages hlwm-run-or-raise)
                #:select (hlwm-run-or-raise))
  #:use-module ((oni packages inbox-size)
                #:select (inbox-size))
  #:use-module ((oni packages mpd-random-albums)
                #:select (mpd-random-albums))
  #:use-module ((oni packages notmuch-collect-tasks)
                #:select (notmuch-collect-tasks))
  #:use-module ((oni packages notmuch-tag-mailinglists)
                #:select (notmuch-tag-mailinglists))
  #:use-module ((oni packages pick-random-wallpaper)
                #:select (pick-random-wallpaper))
  #:use-module ((oni packages shutdown-rofi)
                #:select (shutdown-rofi))
  #:use-module ((oni packages stumpwm)
                #:select (stumpwm+swank))
  #:use-module ((oni packages terminals)
                #:select (tym))
  #:use-module ((oop goops)
                #:select (make)))

(define (with-master-branch package)
  "Apply a transformation to PACKAGE so that it uses the master branch."
  ((options->transformation
    `((with-branch . ,(string-append (package-name package) "=master"))))
   package))

(define rincewind-picom-service
  (service home-picom-service-type
           (home-picom-configuration
            (backend "glx")
            (glx-no-stencil #t)
            (detect-transient #t)
            (shadow #t)
            (shadow-radius 5)
            (shadow-opacity 85)
            (shadow-offset-x 15)
            (shadow-offset-y 15)
            (shadow-exclude
             '("name = 'mowedline'"
               "class_g = 'trayer'"
               "bounding_shaped"
               "class_g = 'i3lock'"))
            (wintypes
             '((dnd (shadow . #f))
               (dock (shadow . #f))))
            (corner-radius 15)
            (blur-background #f)
            (blur-background-frame #f)
            (fading #f))))

(define my-emacs emacs-next-tree-sitter)

(home-environment
 (packages (list easytag
                 (specification->package+output "glibc-locales")
                 (specification->package+output "font-fantasque-sans")
                 (specification->package+output "font-comic-neue")
                 hlwm-run-or-raise
                 pick-random-wallpaper
                 notmuch-collect-tasks
                 notmuch-tag-mailinglists
                 (inbox-size my-emacs)
                 count-emails
                 shutdown-rofi
                 emacs-org-roam
                 emacs-org-roam-ui
                 emacs-org-contacts
                 fakeroot               ; Needed for build arch packages
                 tmsu
                 mpd-random-albums
                 notmuch
                 emacs-inkplate
                 emacs-syncthing-status
                 emacs-outli
                 emacs-guix
                 emacs-fennel-mode

                 (emacs-oni-org-roam my-emacs)
                 emacs-oni-elisp
                 emacs-oni-core
                 emacs-oni-elfeed
                 emacs-oni-eshell
                 emacs-oni-compilation
                 emacs-oni-common-lisp
                 emacs-oni-gui
                 emacs-oni-magit
                 emacs-oni-notmuch
                 emacs-oni-hy
                 emacs-oni-project
                 emacs-oni-bookmark
                 emacs-oni-dired
                 emacs-oni-browse-url
                 emacs-oni-c
                 emacs-oni-circe
                 emacs-oni-clojure
                 emacs-oni-cmake
                 emacs-oni-conf
                 emacs-oni-cpp
                 emacs-oni-csharp
                 emacs-oni-css
                 emacs-oni-diff-hl
                 emacs-oni-ediff
                 emacs-oni-elm
                 emacs-oni-embrace
                 emacs-oni-emms
                 emacs-oni-epub
                 emacs-oni-eww
                 emacs-oni-grep
                 emacs-oni-haskell
                 emacs-oni-highlight-indent-guides
                 emacs-oni-html
                 emacs-oni-java
                 emacs-oni-json
                 emacs-oni-log-edit
                 emacs-oni-lua
                 emacs-oni-makefile
                 emacs-oni-nxml
                 emacs-oni-package
                 emacs-oni-projectile
                 emacs-oni-scheme
                 emacs-oni-sh
                 emacs-oni-shr
                 emacs-oni-tramp
                 emacs-oni-yaml
                 emacs-oni-python
                 emacs-nginx-mode
                 emacs-oni-git-commit

                 tree-sitter-bash
                 tree-sitter-scheme
                 tree-sitter-python
                 tree-sitter-org
                 tree-sitter-json
                 tree-sitter-css
                 gforth
                 recutils
                 emacs-rec-mode
                 ;; Might be needed for certain icons?
                 hicolor-icon-theme
                 ;; Might be needed for cetrificates
                 nss-certs

                 tym))

 (services
  (list
   home-environment-service
   home-rofi-default-service
   home-dunst-default-service
   home-redshift-service
   ;; home-xbindkeys-service
   home-zsh-service
   home-guile-service
   home-xmodmap-service
   home-openssh-service
   home-kitty-service
   rincewind-picom-service

   ;; This has to be the first extension because it needs to be added to the
   ;; configuration last.
   (service home-zsh-syntax-highlighting-service-type)
   (service home-zsh-autosuggestions-service-type)
   (service home-zsh-autopair-service-type)

   (simple-service 'my-channel-service
                   home-channels-service-type
                   (list
                    (channel
                     (name 'oni)
                     (url "https://code.ryuslash.org/ryuslash/guix-packages.git")
                     (introduction
                      (make-channel-introduction
                       "646573578b7adfbff415645fed201269076cebf6"
                       (openpgp-fingerprint
                        "061C C5C4 D936 C9A8 AECC  1A17 7D5C 407B 4350 25C1"))))
                    (channel
                     (name 'nonguix)
                     (url "https://gitlab.com/nonguix/nonguix")
                     ;; Enable signature verification:
                     (introduction
                      (make-channel-introduction
                       "897c1a470da759236cc11798f4e0a5f7d4d59fbc"
                       (openpgp-fingerprint
                        "2A39 3FFF 68F4 EF7A 3D29  12AF 6F51 20A0 22FB B2D5"))))
                    (channel
                     (name 'guix-gaming-games)
                     (url "https://gitlab.com/guix-gaming-channels/games.git")
                     (introduction
                      (make-channel-introduction
                       "c23d64f1b8cc086659f8781b27ab6c7314c5cca5"
                       (openpgp-fingerprint
                        "50F3 3E2E 5B0C 3D90 0424  ABE8 9BDC F497 A4BB CC7F"))))
                    (channel
                     (name 'rosenthal)
                     (url "https://codeberg.org/hako/rosenthal.git")
                     (branch "trunk")
                     (introduction
                      (make-channel-introduction
                       "7677db76330121a901604dfbad19077893865f35"
                       (openpgp-fingerprint
                        "13E7 6CD6 E649 C28C 3385  4DF5 5E5A A665 6149 17F7"))))))

   ;; (service home-polybar-service-type
   ;;          (home-polybar-configuration
   ;;           (bar "rincewind")))

   ;; (service home-kdeconnect-service-type)
   (service home-syncthing-service-type)

   (service home-emacs-service-type
            (home-emacs-configuration
             (package my-emacs)
             (configurations
              (list
               (local-file "../services/emacs/init.el")
               (mixed-text-file
                "init.el"
                "(with-eval-after-load 'hy-mode (require 'oni-hy))\n"
                "(with-eval-after-load 'project (require 'oni-project))\n"
                "(projectile-mode)\n"
                "(setq custom-file \"~/.config/emacs/custom.el\")\n"
                "(load custom-file)\n"
                "(provide 'init)\n"
                ";;; init.el ends here\n")))))
   (service home-emacs-helpful-service-type
            (home-emacs-helpful-configuration
             (configurations
              (list
               (local-file "../services/emacs/oni-helpful.el")))))
   (service home-emacs-yasnippet-capf-service-type)
   (service home-emacs-dashboard-service-type
            (home-emacs-dashboard-configuration
             (configurations
              (list
               (local-file "../services/emacs/oni-dashboard.el")))))
   (service home-emacs-eros-service-type)
   (service home-emacs-ace-link-service-type
            (home-emacs-ace-link-configuration
             (default-key "C-S-e")
             (goto-address-key "C-S-e")
             (org-mode-key "C-S-e")))
   (service home-emacs-ace-link-notmuch-service-type
            (home-emacs-ace-link-notmuch-configuration
             (default-key "C-S-e")))
   (service home-emacs-golden-ratio-service-type)
   (service home-emacs-pinentry-service-type)
   (service home-emacs-vterm-service-type
            (home-emacs-vterm-configuration
             (buffer-name-string "*vterm* %s")))
   (service home-emacs-org-modern-service-type)

   (service home-flameshot-service-type)

   (service home-mpd-service-type
            (home-mpd-configuration
             (music-directory "~/music")
             (playlist-directory "~/music/playlists")
             (log-file "~/.local/share/mpd/mpd.log")
             (pid-file "~/.local/share/mpd/mpd.pid")
             (db-file "~/.local/share/mpd/mpd.db")
             (state-file "~/.local/share/mpd/mpdstate")
             (audio-outputs
              (list (make <home-mpd-audio-output> #:type "pulse" #:name "MPD Pulse")
                    (make <home-mpd-audio-output>
                      #:type "fifo"
                      #:name "Visualizer"
                      #:path "/tmp/mpd.fifo"
                      #:format "44100:16:2")))))
   (service home-mpc-update-service-type)
   (service home-mpd-notify-service-type)

   (service home-mpv-service-type)
   ;; [2024-01-05 Fri] mpv-mpris fails to compile:
   ;;    mpris.c:1:10: fatal error: gio/gio.h: No such file or directory
   ;; Since I don't actually use it right now I really don't need it.
   ; (service home-mpv-mpris-service-type)

   (service home-stumpwm-service-type
            (home-stumpwm-configuration
             (package stumpwm+swank)
             (configurations
              (list (local-file "../services/stumpwm/config")))))
   (service home-stumpwm-gaps-service-type
            (home-stumpwm-gaps-configuration
             (configurations
              (list (local-file "../services/stumpwm/config-gaps")))))
   (service home-stumpwm-stumptray-service-type
            (home-stumpwm-stumptray-configuration
             (configurations
              (list (mixed-text-file "config-stumptray"
                                     "(require 'stumptray)\n"
                                     "(stumptray::stumptray)\n")))))

   (service home-inkplate-display-service-type)
   (service home-notmuch-service-type
            (home-notmuch-configuration
             (database-path "/home/chelys/documents/mail")
             (user-primary-email "tom@ryuslash.org")
             (user-other-email '("ryuslash@gmail.com" "tom@iactor.nl"))
             (new-ignore '(".nnmaildir" ".mbsyncstate" ".uidvalidity"
                           ".mbsyncstate.journal" ".mbsyncstate.new"))))

   (service home-autokey-service-type)
   (service home-copyq-service-type)

   (service home-msmtp-service-type
            (home-msmtp-configuration
             (defaults (msmtp-configuration
                        (auth? #t)
                        (tls? #t)
                        (tls-starttls? #t)
                        (port 587)))
             (accounts
              (list (msmtp-account
                     (name "gmail")
                     ;; Use `secret-tool store --label=msmtp host smtp.gmail.com
                     ;; service smtp user ryuslash@gmail.com' to store the
                     ;; password.
                     (configuration (msmtp-configuration
                                     (host "smtp.gmail.com")
                                     (from "ryuslash@gmail.com")
                                     (user "ryuslash@gmail.com"))))
                    (msmtp-account
                     (name "ryuslash")
                     ;; Use `secret-tool store --label=msmtp host
                     ;; smtp-ryuslash.alwaysdata.net service smtp user
                     ;; tom@ryuslash.org' to store the password.
                     (configuration (msmtp-configuration
                                     (host "smtp-ryuslash.alwaysdata.net")
                                     (from "tom@ryuslash.org")
                                     (user "tom@ryuslash.org"))))))
             (default-account "ryuslash")))

   (service home-gpg-agent-service-type
            (home-gpg-agent-configuration
             (ssh-support? #f)
             (extra-content
              "allow-emacs-pinentry\n")))
   (service home-ssh-agent-service-type))))