diff options
Diffstat (limited to 'src/jd/user.scm')
-rw-r--r-- | src/jd/user.scm | 151 |
1 files changed, 83 insertions, 68 deletions
diff --git a/src/jd/user.scm b/src/jd/user.scm index 7c54a30..7a79e2c 100644 --- a/src/jd/user.scm +++ b/src/jd/user.scm | |||
@@ -4,12 +4,17 @@ | |||
4 | #:use-module (gnu home-services ssh) | 4 | #:use-module (gnu home-services ssh) |
5 | #:use-module (gnu home services xdg) | 5 | #:use-module (gnu home services xdg) |
6 | #:use-module (gnu packages) | 6 | #:use-module (gnu packages) |
7 | #:use-module (gnu packages cups) | ||
7 | #:use-module (gnu packages emacs-xyz) | 8 | #:use-module (gnu packages emacs-xyz) |
8 | #:use-module (gnu packages gnome) | 9 | #:use-module (gnu packages gnome) |
9 | #:use-module (gnu packages gnupg) | 10 | #:use-module (gnu packages gnupg) |
10 | #:use-module (gnu packages guile-xyz) | 11 | #:use-module (gnu packages guile-xyz) |
11 | #:use-module (gnu services) | 12 | #:use-module (gnu services) |
13 | #:use-module (gnu services base) | ||
14 | #:use-module (gnu services cups) | ||
12 | #:use-module (gnu services nix) | 15 | #:use-module (gnu services nix) |
16 | #:use-module (gnu services desktop) | ||
17 | #:use-module (gnu system pam) | ||
13 | 18 | ||
14 | #:use-module (guix channels) | 19 | #:use-module (guix channels) |
15 | #:use-module (guix download) | 20 | #:use-module (guix download) |
@@ -19,6 +24,7 @@ | |||
19 | 24 | ||
20 | #:use-module (jd features mail) | 25 | #:use-module (jd features mail) |
21 | #:use-module (jd features networking) | 26 | #:use-module (jd features networking) |
27 | #:use-module (jd features nextcloud) | ||
22 | 28 | ||
23 | #:use-module (nongnu packages linux) | 29 | #:use-module (nongnu packages linux) |
24 | #:use-module (nongnu system linux-initrd) | 30 | #:use-module (nongnu system linux-initrd) |
@@ -72,14 +78,15 @@ | |||
72 | (feature-base-services) | 78 | (feature-base-services) |
73 | (feature-base-packages) | 79 | (feature-base-packages) |
74 | (feature-desktop-services) | 80 | (feature-desktop-services) |
81 | (feature-tex) | ||
75 | (feature-xdg | 82 | (feature-xdg |
76 | #:xdg-user-directories-configuration | 83 | #:xdg-user-directories-configuration |
77 | (home-xdg-user-directories-configuration | 84 | (home-xdg-user-directories-configuration |
78 | (music "$HOME/music") | 85 | (music "$HOME/music") |
79 | (videos "$HOME/videos") | 86 | (videos "$HOME/videos") |
80 | (pictures "$HOME/pictures") | 87 | (pictures "$HOME/pics") |
81 | (documents "$HOME/documents") | 88 | (documents "$HOME/docs") |
82 | (download "$HOME/downloads") | 89 | (download "$HOME/dl") |
83 | (publicshare "$HOME/sync") | 90 | (publicshare "$HOME/sync") |
84 | (desktop "$HOME") | 91 | (desktop "$HOME") |
85 | (templates "$HOME"))) | 92 | (templates "$HOME"))) |
@@ -142,6 +149,7 @@ | |||
142 | (waybar-battery #:intense? #f) | 149 | (waybar-battery #:intense? #f) |
143 | (waybar-tray) | 150 | (waybar-tray) |
144 | (waybar-clock))) | 151 | (waybar-clock))) |
152 | ;; (feature-nextcloud) | ||
145 | (feature-foot) | 153 | (feature-foot) |
146 | (feature-yt-dlp) | 154 | (feature-yt-dlp) |
147 | (feature-libreoffice) | 155 | (feature-libreoffice) |
@@ -152,9 +160,16 @@ | |||
152 | (feature-swaylock) | 160 | (feature-swaylock) |
153 | (feature-batsignal) | 161 | (feature-batsignal) |
154 | (feature-imv) | 162 | (feature-imv) |
155 | (feature-mpv) | ||
156 | (feature-librewolf) | 163 | (feature-librewolf) |
157 | (feature-ledger))) | 164 | (feature-librewolf |
165 | #:browser (@ (gnu packages gnuzilla) icecat) | ||
166 | #:default-browser? #f) | ||
167 | (feature-librewolf | ||
168 | #:browser (@ (nongnu packages mozilla) firefox) | ||
169 | #:default-browser? #f) | ||
170 | ;; (feature-ungoogled-chromium) | ||
171 | (feature-ledger) | ||
172 | (feature-mpv))) | ||
158 | 173 | ||
159 | (define-public %mail-features | 174 | (define-public %mail-features |
160 | (list | 175 | (list |
@@ -182,14 +197,7 @@ | |||
182 | (rde-elisp-configuration-service | 197 | (rde-elisp-configuration-service |
183 | f-name | 198 | f-name |
184 | config | 199 | config |
185 | `((with-eval-after-load 'geiser-mode | 200 | `((with-eval-after-load 'notmuch |
186 | (defun jd/guix-repl () | ||
187 | (interactive) | ||
188 | (let ((geiser-guile-binary '("guix" "repl")) | ||
189 | (geiser-guile-load-path (cons "~/dotfiles/rde" geiser-guile-load-path))) | ||
190 | (geiser 'guile)))) | ||
191 | |||
192 | (with-eval-after-load 'notmuch | ||
193 | (setq-default notmuch-search-oldest-first nil)) | 201 | (setq-default notmuch-search-oldest-first nil)) |
194 | 202 | ||
195 | (with-eval-after-load 'paredit | 203 | (with-eval-after-load 'paredit |
@@ -240,24 +248,30 @@ | |||
240 | (global-page-break-lines-mode 1)) | 248 | (global-page-break-lines-mode 1)) |
241 | 249 | ||
242 | (with-eval-after-load 'gptel | 250 | (with-eval-after-load 'gptel |
243 | (setq gptel-model 'gpt-4o | 251 | (setq gptel-model 'gpt-4o |
244 | gptel-backend (gptel-make-gh-copilot "Copilot"))) | 252 | gptel-backend (gptel-make-gh-copilot "Copilot"))) |
245 | 253 | ||
246 | (with-eval-after-load 'simple | 254 | (with-eval-after-load 'simple |
247 | (add-hook 'after-init-hook (lambda () | 255 | (add-hook |
248 | (delete-selection-mode 1) | 256 | 'after-init-hook |
249 | (pixel-scroll-precision-mode 0) | 257 | (lambda () |
250 | (electric-pair-mode 1) | 258 | (delete-selection-mode 1) |
251 | (setq-default truncate-lines t) | 259 | (pixel-scroll-precision-mode 0) |
252 | (setq-default cursor-in-non-selected-windows 'hollow) | 260 | (electric-pair-mode 1) |
253 | (setq-default cursor-type 'box) | 261 | (setq-default truncate-lines t) |
254 | ;; (set-face-attribute 'default nil :height 165) | 262 | (setq-default cursor-in-non-selected-windows 'hollow) |
255 | ;; (require 'solarized-theme) | 263 | (setq-default cursor-type 'box) |
256 | (require 'multiple-cursors) | 264 | (require 'multiple-cursors) |
257 | (require 'undo-tree) | 265 | (require 'undo-tree) |
258 | (require 'rainbow-delimiters) | 266 | (require 'rainbow-delimiters) |
259 | (require 'paredit) | 267 | (require 'paredit) |
260 | )) | 268 | (require 'url) |
269 | (require 'json) | ||
270 | (require 'org) | ||
271 | (require 'org-pdftools) | ||
272 | (defalias 'getf 'cl-getf) | ||
273 | (defalias 'find-if 'cl-find-if) | ||
274 | (add-hook 'org-mode-hook 'org-pdftools-setup-link))) | ||
261 | (set-default 'display-fill-column-indicator-column 100) | 275 | (set-default 'display-fill-column-indicator-column 100) |
262 | (add-hook 'prog-mode-hook 'display-fill-column-indicator-mode) | 276 | (add-hook 'prog-mode-hook 'display-fill-column-indicator-mode) |
263 | (setq display-line-numbers-type 'relative) | 277 | (setq display-line-numbers-type 'relative) |
@@ -270,11 +284,10 @@ | |||
270 | "emacs-hl-todo" | 284 | "emacs-hl-todo" |
271 | "emacs-undo-tree" | 285 | "emacs-undo-tree" |
272 | "emacs-multiple-cursors" | 286 | "emacs-multiple-cursors" |
273 | ;; "emacs-swiper" | ||
274 | ;; "emacs-solarized-theme" | ||
275 | "emacs-nginx-mode" | 287 | "emacs-nginx-mode" |
276 | "emacs-yaml-mode" | 288 | "emacs-yaml-mode" |
277 | "emacs-org-present")))) | 289 | "emacs-org-present" |
290 | "emacs-org-pdftools")))) | ||
278 | (feature | 291 | (feature |
279 | (name f-name) | 292 | (name f-name) |
280 | (values `((,f-name . #t))) | 293 | (values `((,f-name . #t))) |
@@ -282,30 +295,33 @@ | |||
282 | 295 | ||
283 | (define-public %emacs-features | 296 | (define-public %emacs-features |
284 | (list | 297 | (list |
285 | (feature-emacs-modus-themes #:headings-scaling? #t | 298 | (feature-emacs-modus-themes #:deuteranopia? #f) |
286 | #:deuteranopia? #f) | 299 | (feature-emacs-citation #:global-bibliography (list "/home/jakub/docs/notes/references/master.bib")) |
287 | (feature-emacs-citation #:global-bibliography (list "/home/jakub/Notes/Roam/references/master.bib")) | ||
288 | (feature-emacs-completion #:mini-frame? #f ;; Dziwne kurwa bledy | 300 | (feature-emacs-completion #:mini-frame? #f ;; Dziwne kurwa bledy |
289 | #:marginalia-align 'right) | 301 | #:marginalia-align 'right) |
290 | (feature-emacs-corfu #:corfu-doc-auto #f) | 302 | (feature-emacs-corfu #:corfu-doc-auto #f) |
291 | (feature-emacs #:default-application-launcher? #t) | 303 | (feature-emacs #:default-application-launcher? #t) |
292 | (feature-emacs-elfeed #:elfeed-org-files '("/home/jakub/Notes/Rss.org")) | 304 | (feature-emacs-elfeed #:elfeed-org-files '("/home/jakub/docs/notes/rss.org")) |
293 | (feature-emacs-erc #:erc-log? #t | 305 | (feature-emacs-erc #:erc-log? #t |
294 | #:erc-autojoin-channels-alist '((Libera.Chat "#rde") | 306 | #:erc-autojoin-channels-alist '((Libera.Chat "#rde") |
295 | (Libera.Chat "#systemcrafters") | 307 | (Libera.Chat "#systemcrafters") |
296 | (Libera.Chat "#lisp-pl") | 308 | (Libera.Chat "#lisp-pl") |
297 | (Libera.Chat "#hsp"))) | 309 | (Libera.Chat "#hsp"))) |
298 | (feature-emacs-keycast #:turn-on? #f) | 310 | (feature-emacs-keycast #:turn-on? #f) |
299 | (feature-emacs-org-agenda #:org-agenda-files '("/home/jakub/Notes/Me.org" "/home/jakub/Notes/Work.org")) | 311 | (feature-emacs-org-agenda #:org-agenda-files '("/home/jakub/docs/notes/personal.org" |
312 | "/home/jakub/docs/notes/s22425.org")) | ||
300 | (feature-emacs-org-dailies #:encrypted? #t) | 313 | (feature-emacs-org-dailies #:encrypted? #t) |
301 | (feature-emacs-org #:org-directory "/home/jakub/Notes" | 314 | (feature-emacs-org #:org-directory "/home/jakub/docs/notes" |
302 | #:org-indent? #f) | 315 | #:org-indent? #t) |
303 | (feature-emacs-org-roam #:org-roam-directory "/home/jakub/Notes/Roam/slip-box") | 316 | (feature-emacs-org-roam #:org-roam-directory "/home/jakub/docs/notes/slip-box") |
304 | (feature-emacs-spelling #:spelling-program (@ (gnu packages hunspell) hunspell) | 317 | (feature-emacs-spelling #:spelling-program (@ (gnu packages hunspell) hunspell) |
305 | #:spelling-dictionaries (list (@ (gnu packages hunspell) hunspell-dict-en) | 318 | #:spelling-dictionaries (list (@ (gnu packages hunspell) hunspell-dict-en) |
306 | (@ (gnu packages hunspell) hunspell-dict-pl)) | 319 | (@ (gnu packages hunspell) hunspell-dict-pl)) |
307 | #:ispell-standard-dictionary "pl_PL") | 320 | #:ispell-standard-dictionary "pl_PL") |
308 | (feature-emacs-dired #:extra-switches "-h") | 321 | (feature-emacs-dired #:extra-switches "-h") |
322 | (feature-emacs-monocle #:olivetti-body-width 100) | ||
323 | (feature-emacs-denote #:denote-directory "/home/jakub/docs/notes") | ||
324 | (feature-emacs-devdocs) | ||
309 | (feature-emacs-appearance) | 325 | (feature-emacs-appearance) |
310 | (feature-emacs-dashboard) | 326 | (feature-emacs-dashboard) |
311 | (feature-emacs-eglot) | 327 | (feature-emacs-eglot) |
@@ -314,7 +330,6 @@ | |||
314 | (feature-emacs-gptel) | 330 | (feature-emacs-gptel) |
315 | (feature-emacs-guix) | 331 | (feature-emacs-guix) |
316 | (feature-emacs-message) | 332 | (feature-emacs-message) |
317 | (feature-emacs-monocle) | ||
318 | (feature-emacs-nov-el) | 333 | (feature-emacs-nov-el) |
319 | (feature-emacs-pdf-tools) | 334 | (feature-emacs-pdf-tools) |
320 | (feature-emacs-personal-config) | 335 | (feature-emacs-personal-config) |
@@ -331,10 +346,11 @@ | |||
331 | 346 | ||
332 | (define %dev-features | 347 | (define %dev-features |
333 | (list | 348 | (list |
349 | (feature-markdown #:headings-scaling? #t) | ||
334 | (feature-android) | 350 | (feature-android) |
335 | (feature-clojure) | 351 | (feature-clojure) |
336 | (feature-markdown) | 352 | (feature-python) |
337 | (feature-python))) | 353 | (feature-octave))) |
338 | 354 | ||
339 | (define %virtualization-features | 355 | (define %virtualization-features |
340 | (list | 356 | (list |
@@ -380,36 +396,25 @@ | |||
380 | (feature-custom-services | 396 | (feature-custom-services |
381 | #:feature-name-prefix 'jd-additional-services | 397 | #:feature-name-prefix 'jd-additional-services |
382 | #:system-services | 398 | #:system-services |
383 | (list (service nix-service-type)) | 399 | (list (service nix-service-type) |
400 | (service gnome-keyring-service-type) | ||
401 | (service pam-limits-service-type | ||
402 | (list | ||
403 | (pam-limits-entry "*" 'both 'nofile 100000) ;; Required for some cases when building Docker images in Nix | ||
404 | (pam-limits-entry "@users" 'both 'rtprio 99) ;; Needed for Guitarix | ||
405 | (pam-limits-entry "@users" 'both 'memlock 'unlimited))) | ||
406 | (service cups-service-type | ||
407 | (cups-configuration | ||
408 | (web-interface? #t) | ||
409 | (extensions | ||
410 | (list cups-filters))))) | ||
384 | #:home-services | 411 | #:home-services |
385 | (list | 412 | (list |
386 | (simple-service | 413 | (simple-service |
387 | 'home-environment-extra-variables | 414 | 'home-environment-extra-variables |
388 | home-environment-variables-service-type | 415 | home-environment-variables-service-type |
389 | '(("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share"))) | 416 | '(("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share"))) |
390 | ;; (simple-service | 417 | |
391 | ;; 'home-nextcloud-package | ||
392 | ;; home-profile-service-type | ||
393 | ;; (list | ||
394 | ;; (@@ (gnu packages sync) nextcloud-client))) | ||
395 | (simple-service | ||
396 | 'nextcloud-shepherd-service | ||
397 | home-shepherd-service-type | ||
398 | (list | ||
399 | (shepherd-service | ||
400 | (provision `(nextcloud)) | ||
401 | (auto-start? #t) | ||
402 | (stop #~(make-kill-destructor)) | ||
403 | (start #~(make-forkexec-constructor | ||
404 | (list #$(program-file | ||
405 | "nextcloud" | ||
406 | #~(begin | ||
407 | (setenv "QT_QPA_PLATFORM" "wayland-egl;xcb") | ||
408 | (apply system* | ||
409 | (list | ||
410 | #$(file-append (@ (gnu packages sync) nextcloud-client) "/bin/nextcloud"))))))))))) | ||
411 | ;; (simple-service | ||
412 | ;; 'home-nextcloud-daemon) | ||
413 | (simple-service | 418 | (simple-service |
414 | 'home-profile-extra-packages | 419 | 'home-profile-extra-packages |
415 | home-profile-service-type | 420 | home-profile-service-type |
@@ -435,13 +440,23 @@ | |||
435 | "gnome-themes-extra" "papirus-icon-theme" | 440 | "gnome-themes-extra" "papirus-icon-theme" |
436 | "arc-theme" | 441 | "arc-theme" |
437 | 442 | ||
443 | "xdg-desktop-portal-gnome" | ||
444 | |||
438 | "fd" | 445 | "fd" |
439 | "nautilus" | 446 | "nautilus" |
440 | "qbittorrent" | 447 | "qbittorrent" |
441 | "kdenlive" "gimp" | 448 | "kdenlive" "gimp" |
442 | "blender" | 449 | "blender" |
443 | 450 | ||
444 | "ripgrep" "curl")))))) | 451 | "ripgrep" "curl" |
452 | |||
453 | "texlive" "texlive-collection-basic" | ||
454 | "texlive-bin" "texlive-collection-latex" | ||
455 | "texlive-collection-fontsrecommended" | ||
456 | "texlive-collection-pictures" | ||
457 | "texlive-collection-latexextra" | ||
458 | "texlive-dvipng")))))) | ||
459 | |||
445 | 460 | ||
446 | (define-public (feature-nonfree-kernel) | 461 | (define-public (feature-nonfree-kernel) |
447 | (feature-kernel | 462 | (feature-kernel |