diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2024-04-26 18:21:56 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2024-04-27 18:20:11 +0200 |
commit | 73af89d935df5a8166114c9257f9f247f29850bf (patch) | |
tree | c8addfe86575b030ca5a61644dbc77adb8f63c43 /guix/jd | |
parent | 9ca1ae3ceca5944765af94514e75a96195de5716 (diff) | |
download | dotfiles-73af89d935df5a8166114c9257f9f247f29850bf.tar.gz dotfiles-73af89d935df5a8166114c9257f9f247f29850bf.zip |
Migrate from stumpwm to sway and from manifests to home-services.
Diffstat (limited to 'guix/jd')
-rw-r--r-- | guix/jd/desktops/base.scm | 128 | ||||
-rw-r--r-- | guix/jd/desktops/mimir.scm | 6 | ||||
-rw-r--r-- | guix/jd/home/services/desktop.scm | 178 | ||||
-rw-r--r-- | guix/jd/home/services/emacs.scm | 112 | ||||
-rw-r--r-- | guix/jd/packages/emacs.scm | 57 | ||||
-rw-r--r-- | guix/jd/utils.scm | 21 |
6 files changed, 412 insertions, 90 deletions
diff --git a/guix/jd/desktops/base.scm b/guix/jd/desktops/base.scm index db95939..c613c26 100644 --- a/guix/jd/desktops/base.scm +++ b/guix/jd/desktops/base.scm | |||
@@ -1,6 +1,7 @@ | |||
1 | (define-module (jd desktops base) | 1 | (define-module (jd desktops base) |
2 | #:use-module (jd home services polkit) | 2 | #:use-module (jd home services polkit) |
3 | #:use-module (jd home services desktop) | 3 | #:use-module (jd home services desktop) |
4 | #:use-module (jd home services emacs) | ||
4 | #:use-module (jd services polkit) | 5 | #:use-module (jd services polkit) |
5 | 6 | ||
6 | #:use-module (gnu) | 7 | #:use-module (gnu) |
@@ -9,61 +10,46 @@ | |||
9 | #:use-module (gnu home services desktop) | 10 | #:use-module (gnu home services desktop) |
10 | #:use-module (gnu home services gnupg) | 11 | #:use-module (gnu home services gnupg) |
11 | #:use-module (gnu home services xdg) | 12 | #:use-module (gnu home services xdg) |
13 | #:use-module (gnu home services sound) | ||
12 | #:use-module (gnu services) | 14 | #:use-module (gnu services) |
15 | #:use-module (guix packages) | ||
13 | 16 | ||
14 | #:use-module (nongnu packages linux) | 17 | #:use-module (nongnu packages linux) |
15 | #:use-module (nongnu system linux-initrd)) | 18 | #:use-module (nongnu system linux-initrd)) |
16 | 19 | ||
17 | (use-package-modules wm gnome gnupg networking virtualization | 20 | (use-package-modules wm gnome networking virtualization |
18 | lisp lisp-xyz cups) | 21 | lisp lisp-xyz cups fonts gnupg) |
19 | 22 | ||
20 | (use-service-modules cups desktop networking ssh xorg | 23 | (use-service-modules cups desktop networking ssh xorg |
21 | docker virtualization pm sound dbus | 24 | docker virtualization pm sound dbus |
22 | nix) | 25 | nix sddm) |
23 | 26 | ||
24 | (define-public %jd-base-home-services | 27 | (define-public %jd-base-home-services |
25 | (list | 28 | (list |
26 | (service home-xdg-mime-applications-service-type | 29 | ;; (service home-redshift-service-type |
27 | (home-xdg-mime-applications-configuration | 30 | ;; (home-redshift-configuration |
28 | (default '((inode/directory . emacs-desktop.desktop) | 31 | ;; (location-provider 'manual) |
29 | (application/pdf . emacs-desktop.desktop))) | 32 | ;; (latitude 51.919438) |
30 | (desktop-entries | 33 | ;; (longitude 19.145136))) |
31 | (list (xdg-desktop-entry | 34 | ;; Poland |
32 | (file "emacs-desktop") | ||
33 | (name "Emacs") | ||
34 | (type 'application) | ||
35 | (config | ||
36 | '((exec . "emacsclient -a emacs %u")))))))) | ||
37 | |||
38 | (service home-redshift-service-type | ||
39 | (home-redshift-configuration | ||
40 | (location-provider 'manual) | ||
41 | (latitude 51.919438) | ||
42 | (longitude 19.145136))) ;; Poland | ||
43 | |||
44 | (simple-service 'some-useful-env-vars-service | ||
45 | home-environment-variables-service-type | ||
46 | `(("GTK_THEME" . "Adwaita:dark") | ||
47 | ("VISUAL" . "emacsclient") | ||
48 | ("EDITOR" . "emacsclient") | ||
49 | ("PATH" . "$HOME/.bin:$HOME/.npm-global/bin:$PATH") | ||
50 | ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share") | ||
51 | ("SBCL_HOME" . "/run/current-system/profile/lib/sbcl/"))) | ||
52 | |||
53 | (service home-gpg-agent-service-type | ||
54 | (home-gpg-agent-configuration | ||
55 | (pinentry-program | ||
56 | (file-append pinentry "/bin/pinentry")) | ||
57 | (ssh-support? #t) | ||
58 | (default-cache-ttl 28800) | ||
59 | (max-cache-ttl 28800) | ||
60 | (default-cache-ttl-ssh 28800) | ||
61 | (max-cache-ttl-ssh 28800))) | ||
62 | 35 | ||
63 | (service home-dbus-service-type) | 36 | (service home-dbus-service-type) |
64 | 37 | (service home-emacs-service-type) | |
65 | (service home-desktop-service-type) | 38 | (service home-desktop-service-type) |
66 | (service home-polkit-gnome-service-type))) | 39 | |
40 | ;; Dont know why, but when i put home-gpg-agent-service-type as an | ||
41 | ;; extension in home-desktop-service-type service it doesn't work. | ||
42 | (service home-gpg-agent-service-type | ||
43 | (home-gpg-agent-configuration | ||
44 | (pinentry-program | ||
45 | (file-append pinentry-gnome3 "/bin/pinentry-gnome3")) | ||
46 | (ssh-support? #t) | ||
47 | (default-cache-ttl 28800) | ||
48 | (max-cache-ttl 28800) | ||
49 | (default-cache-ttl-ssh 28800) | ||
50 | (max-cache-ttl-ssh 28800))) | ||
51 | ;; (service home-polkit-gnome-service-type) | ||
52 | )) | ||
67 | 53 | ||
68 | 54 | ||
69 | (define-public %jakub-user | 55 | (define-public %jakub-user |
@@ -82,7 +68,6 @@ | |||
82 | "audio" ;; control audio devices | 68 | "audio" ;; control audio devices |
83 | "video" ;; access to webcam | 69 | "video" ;; access to webcam |
84 | "dialout" ;; access to /dev/ttyUSBX devices | 70 | "dialout" ;; access to /dev/ttyUSBX devices |
85 | "adbusers" | ||
86 | )))) | 71 | )))) |
87 | 72 | ||
88 | (define-public %jd-base-user-accounts | 73 | (define-public %jd-base-user-accounts |
@@ -105,6 +90,8 @@ | |||
105 | sbcl-stumpwm-battery-portable | 90 | sbcl-stumpwm-battery-portable |
106 | sbcl-stumpwm-stumptray | 91 | sbcl-stumpwm-stumptray |
107 | 92 | ||
93 | sbcl-stumpwm-ttf-fonts | ||
94 | |||
108 | sbcl-drakma | 95 | sbcl-drakma |
109 | sbcl-yason | 96 | sbcl-yason |
110 | 97 | ||
@@ -121,21 +108,54 @@ | |||
121 | "xf86-input-libinput" | 108 | "xf86-input-libinput" |
122 | "intel-vaapi-driver" | 109 | "intel-vaapi-driver" |
123 | "libva-utils" ;; vainfo | 110 | "libva-utils" ;; vainfo |
124 | "nss-certs" | 111 | ;; "nss-certs" -- it is in %base-packages from fdfd7667c66cf9ce746330f39bcd366e124460e1 |
125 | "nix"))) | 112 | "nix"))) |
126 | 113 | ||
127 | (define-public %jd-base-packages | 114 | (define-public %jd-base-packages |
128 | (append %root-packages | 115 | (append %root-packages |
129 | %stumpwm-packages | 116 | ;; %stumpwm-packages |
130 | %base-packages)) | 117 | %base-packages)) |
131 | 118 | ||
132 | (define-public %jd-base-services | 119 | (define-public %jd-base-services |
133 | (cons* | 120 | (cons* |
134 | (service openssh-service-type) | 121 | (service openssh-service-type) |
135 | 122 | ||
136 | (set-xorg-configuration | 123 | ;; (set-xorg-configuration |
137 | (xorg-configuration ;for Xorg | 124 | ;; (xorg-configuration ;for Xorg |
138 | (keyboard-layout (keyboard-layout "pl")))) | 125 | ;; (keyboard-layout (keyboard-layout "pl")))) |
126 | ;; (service greetd-service-type | ||
127 | ;; (greetd-configuration | ||
128 | ;; ;; We need to give the greeter user these permissions, otherwise | ||
129 | ;; ;; Sway will crash on launch. | ||
130 | ;; (greeter-supplementary-groups (list "video" "input")) | ||
131 | ;; (terminals | ||
132 | ;; (list (greetd-terminal-configuration | ||
133 | ;; (terminal-vt "1") | ||
134 | ;; (terminal-switch #t)) | ||
135 | ;; (greetd-terminal-configuration | ||
136 | ;; (terminal-vt "2")) | ||
137 | ;; (greetd-terminal-configuration | ||
138 | ;; (terminal-vt "3")) | ||
139 | ;; (greetd-terminal-configuration | ||
140 | ;; (terminal-vt "4")) | ||
141 | ;; (greetd-terminal-configuration | ||
142 | ;; (terminal-vt "5")) | ||
143 | ;; (greetd-terminal-configuration | ||
144 | ;; (terminal-vt "6")))))) | ||
145 | |||
146 | (service console-font-service-type | ||
147 | (map (lambda (tty) | ||
148 | (cons tty (file-append | ||
149 | font-terminus | ||
150 | "/share/consolefonts/ter-112n"))) | ||
151 | '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6"))) | ||
152 | |||
153 | (service screen-locker-service-type | ||
154 | (screen-locker-configuration | ||
155 | (name "swaylock") | ||
156 | (program (file-append swaylock "/bin/swaylock")) | ||
157 | (using-pam? #t) | ||
158 | (using-setuid? #f))) | ||
139 | 159 | ||
140 | (service network-manager-service-type | 160 | (service network-manager-service-type |
141 | (network-manager-configuration | 161 | (network-manager-configuration |
@@ -180,7 +200,17 @@ | |||
180 | (append (list (plain-file "non-guix.pub" | 200 | (append (list (plain-file "non-guix.pub" |
181 | "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))")) | 201 | "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))")) |
182 | %default-authorized-guix-keys)))) | 202 | %default-authorized-guix-keys)))) |
183 | (delete network-manager-service-type)))) | 203 | (delete network-manager-service-type) |
204 | ;; (delete mingetty-service-type) | ||
205 | (delete console-font-service-type) | ||
206 | |||
207 | (delete pulseaudio-service-type) | ||
208 | (delete alsa-service-type) | ||
209 | (delete (if (string-prefix? "x86_64" | ||
210 | (or (%current-target-system) | ||
211 | (%current-system))) | ||
212 | gdm-service-type | ||
213 | sddm-service-type))))) | ||
184 | 214 | ||
185 | ;; Odin is a base for my operating systems | 215 | ;; Odin is a base for my operating systems |
186 | (define-public odin-free | 216 | (define-public odin-free |
diff --git a/guix/jd/desktops/mimir.scm b/guix/jd/desktops/mimir.scm index 742f8c5..7d9823d 100644 --- a/guix/jd/desktops/mimir.scm +++ b/guix/jd/desktops/mimir.scm | |||
@@ -18,17 +18,17 @@ | |||
18 | 18 | ||
19 | (swap-devices (list (swap-space | 19 | (swap-devices (list (swap-space |
20 | (target (uuid | 20 | (target (uuid |
21 | "658793cb-d374-426e-bcd5-00d032b003a0"))))) | 21 | "5402ec34-85b8-4716-9c37-3d38c452ef98"))))) |
22 | 22 | ||
23 | (file-systems (cons* (file-system | 23 | (file-systems (cons* (file-system |
24 | (mount-point "/boot/efi") | 24 | (mount-point "/boot/efi") |
25 | (device (uuid "64D8-134F" | 25 | (device (uuid "1A88-DB36" |
26 | 'fat32)) | 26 | 'fat32)) |
27 | (type "vfat")) | 27 | (type "vfat")) |
28 | (file-system | 28 | (file-system |
29 | (mount-point "/") | 29 | (mount-point "/") |
30 | (device (uuid | 30 | (device (uuid |
31 | "1f9304b0-5623-4248-ab66-534b5ac85876" | 31 | "640c44ea-125f-4410-a8de-3ec0fb3656c4" |
32 | 'ext4)) | 32 | 'ext4)) |
33 | (type "ext4")) %base-file-systems)))) | 33 | (type "ext4")) %base-file-systems)))) |
34 | 34 | ||
diff --git a/guix/jd/home/services/desktop.scm b/guix/jd/home/services/desktop.scm index bb4916e..c53377f 100644 --- a/guix/jd/home/services/desktop.scm +++ b/guix/jd/home/services/desktop.scm | |||
@@ -4,51 +4,165 @@ | |||
4 | #:use-module (gnu packages networking) | 4 | #:use-module (gnu packages networking) |
5 | #:use-module (gnu packages syncthing) | 5 | #:use-module (gnu packages syncthing) |
6 | #:use-module (gnu packages gnome) | 6 | #:use-module (gnu packages gnome) |
7 | #:use-module (gnu packages gnupg) | ||
7 | #:use-module (gnu services) | 8 | #:use-module (gnu services) |
8 | #:use-module (gnu services configuration) | 9 | #:use-module (gnu services configuration) |
9 | #:use-module (gnu home services) | 10 | #:use-module (gnu home services) |
10 | #:use-module (gnu home services shepherd) | 11 | #:use-module (gnu home services shepherd) |
11 | #:use-module (gnu home services desktop) | 12 | #:use-module (gnu home services desktop) |
13 | #:use-module (gnu home services sound) | ||
14 | #:use-module (gnu home services xdg) | ||
15 | #:use-module (gnu home services gnupg) | ||
12 | #:use-module (guix gexp)) | 16 | #:use-module (guix gexp)) |
13 | 17 | ||
14 | (define (desktop-profile-service config) | 18 | (define (desktop-profile-service config) |
15 | (specifications->packages '("udiskie" | 19 | (specifications->packages '(;; sway |
20 | "swayfx" | ||
21 | "swaylock" | ||
22 | "swayidle" | ||
23 | "waybar" | ||
24 | "fuzzel" | ||
25 | "foot" | ||
26 | "mako" | ||
27 | "wl-clipboard" | ||
28 | "wlsunset" | ||
29 | "grimshot" | ||
30 | |||
31 | "udiskie" | ||
32 | ;; rest | ||
33 | "qutebrowser" | ||
34 | "ungoogled-chromium" | ||
35 | "firefox" | ||
36 | "tor-client" | ||
37 | "signal-desktop" | ||
38 | |||
39 | "pulsemixer" | ||
40 | "pavucontrol" | ||
41 | "alsa-utils" | ||
42 | |||
43 | "virt-manager" | ||
44 | |||
45 | "flatpak" | ||
46 | "redshift" | ||
47 | "fontmanager" | ||
48 | |||
49 | "polybar" | ||
50 | |||
51 | "blueman" | ||
52 | |||
53 | "xdg-utils" | ||
54 | "xdg-dbus-proxy" | ||
55 | "xdg-desktop-portal-gtk" | ||
56 | "xdg-desktop-portal-wlr" | ||
57 | "glib:bin" | ||
58 | "gtk+:bin" | ||
59 | "gnome-keyring" | ||
60 | "shared-mime-info" | ||
61 | "libnotify" | ||
62 | "dconf" | ||
63 | "hicolor-icon-theme" | ||
64 | |||
65 | "dunst" | ||
66 | |||
67 | "gimp" | ||
68 | "inkscape" | ||
69 | |||
70 | "mpv" | ||
71 | "youtube-dl" | ||
72 | |||
73 | "pamixer" | ||
74 | "playerctl" | ||
75 | "scrot" | ||
76 | "brightnessctl" | ||
77 | "upower" | ||
78 | "tlp" | ||
79 | "feh" | ||
80 | "alacritty" | ||
81 | |||
82 | "curl" | ||
83 | "wget" | ||
84 | "zip" | ||
85 | "unzip" | ||
86 | "qrencode" | ||
87 | "trash-cli" | ||
88 | "pandoc" | ||
89 | "password-store" | ||
90 | "oath-toolkit" | ||
91 | ;; "pinentry" | ||
92 | |||
93 | "syncthing" | ||
16 | "syncthing-gtk" | 94 | "syncthing-gtk" |
17 | "network-manager-applet"))) | 95 | |
18 | 96 | "xmodmap" | |
19 | (define (desktop-shepherd-services config) | 97 | "xrandr" |
20 | (list (shepherd-service | 98 | "arandr" |
21 | (documentation "Udiskie daemon with tray.") | 99 | "xss-lock" |
22 | (provision '(udiskie)) | 100 | "libinput" |
23 | (start #~(make-forkexec-constructor | 101 | "xinput" |
24 | (list #$(file-append udiskie | 102 | "xprop" |
25 | "/bin/udiskie") | 103 | "rlwrap" |
26 | "-t"))) | 104 | |
27 | (stop #~(make-kill-destructor))) | 105 | "nheko" |
28 | 106 | "quassel"))) | |
29 | (shepherd-service | 107 | |
30 | (documentation "Syncthing daemon with tray.") | 108 | (define (desktop-environment-variables-service config) |
31 | (provision '(syncthing-gtk)) | 109 | `(("GTK_THEME" . "Adwaita:dark") |
32 | (start #~(make-forkexec-constructor | 110 | ("VISUAL" . "emacsclient") |
33 | (list #$(file-append syncthing-gtk | 111 | ("EDITOR" . "emacsclient") |
34 | "/bin/syncthing-gtk") | 112 | ("PATH" . "$HOME/.bin:$HOME/.npm-global/bin:$PATH") |
35 | "-m"))) | 113 | ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share") |
36 | (stop #~(make-kill-destructor))) | 114 | ("SBCL_HOME" . "/run/current-system/profile/lib/sbcl/") |
37 | 115 | ||
38 | (shepherd-service | 116 | ;; Set Wayland-specific environment variables (taken from RDE) |
39 | (documentation "NetworkManager tray.") | 117 | ("XDG_CURRENT_DESKTOP" . "sway") |
40 | (provision '(nm-applet)) | 118 | ("XDG_SESSION_TYPE" . "wayland") |
41 | (start #~(make-forkexec-constructor | 119 | ("RTC_USE_PIPEWIRE" . "true") |
42 | (list #$(file-append network-manager-applet | 120 | ("SDL_VIDEODRIVER" . "wayland") |
43 | "/bin/nm-applet")))) | 121 | ("MOZ_ENABLE_WAYLAND" . "1") |
44 | (stop #~(make-kill-destructor))))) | 122 | ("CLUTTER_BACKEND" . "wayland") |
123 | ("ELM_ENGINE" . "wayland_egl") | ||
124 | ("ECORE_EVAS_ENGINE" . "wayland-egl") | ||
125 | ("QT_QPA_PLATFORM" . "wayland-egl"))) | ||
126 | |||
127 | (define (desktop-xdg-mime-applications-service config) | ||
128 | (home-xdg-mime-applications-configuration | ||
129 | (default '((inode/directory . emacsclient.desktop) | ||
130 | (application/pdf . emacsclient.desktop) | ||
131 | (x-scheme-handler/http= . firefox.desktop) | ||
132 | (x-scheme-handler/https= . firefox.desktop))) | ||
133 | ;; (desktop-entries | ||
134 | ;; (list (xdg-desktop-entry | ||
135 | ;; (file "emacs-desktop") | ||
136 | ;; (name "Emacs") | ||
137 | ;; (type 'application) | ||
138 | ;; (config | ||
139 | ;; '((exec . "emacsclient -a emacs %u")))))) | ||
140 | )) | ||
141 | |||
142 | (define (desktop-gpg-agent-service config) | ||
143 | (home-gpg-agent-configuration | ||
144 | (pinentry-program | ||
145 | (file-append pinentry-gnome3 "/bin/pinentry-gnome3")) | ||
146 | (ssh-support? #t) | ||
147 | (default-cache-ttl 28800) | ||
148 | (max-cache-ttl 28800) | ||
149 | (default-cache-ttl-ssh 28800) | ||
150 | (max-cache-ttl-ssh 28800))) | ||
151 | |||
45 | 152 | ||
46 | (define-public home-desktop-service-type | 153 | (define-public home-desktop-service-type |
47 | (service-type (name 'home-udiskie) | 154 | (service-type (name 'home-desktop) |
48 | (extensions (list (service-extension home-profile-service-type | 155 | (extensions (list (service-extension home-profile-service-type |
49 | desktop-profile-service) | 156 | desktop-profile-service) |
50 | (service-extension home-shepherd-service-type | 157 | (service-extension home-environment-variables-service-type |
51 | desktop-shepherd-services))) | 158 | desktop-environment-variables-service) |
159 | (service-extension home-pipewire-service-type | ||
160 | (lambda (_) (home-pipewire-configuration))) | ||
161 | (service-extension home-xdg-mime-applications-service-type | ||
162 | desktop-xdg-mime-applications-service) | ||
163 | (service-extension home-gpg-agent-service-type | ||
164 | desktop-gpg-agent-service) | ||
165 | )) | ||
52 | (default-value #f) | 166 | (default-value #f) |
53 | (description "Runs desktop services."))) | 167 | (description "Runs desktop services."))) |
54 | 168 | ||
diff --git a/guix/jd/home/services/emacs.scm b/guix/jd/home/services/emacs.scm new file mode 100644 index 0000000..5eb74e8 --- /dev/null +++ b/guix/jd/home/services/emacs.scm | |||
@@ -0,0 +1,112 @@ | |||
1 | (define-module (jd home services emacs) | ||
2 | #:use-module (jd packages emacs) | ||
3 | |||
4 | #:use-module (gnu packages) | ||
5 | #:use-module (gnu packages emacs) | ||
6 | |||
7 | #:use-module (gnu services) | ||
8 | #:use-module (gnu services configuration) | ||
9 | #:use-module (gnu home services) | ||
10 | #:use-module (gnu home services shepherd) | ||
11 | #:use-module (gnu home services desktop) | ||
12 | |||
13 | #:use-module (guix gexp) | ||
14 | #:use-module (guix packages) | ||
15 | #:use-module (guix profiles)) | ||
16 | |||
17 | (define-configuration home-emacs-service-configuration | ||
18 | (emacs-package | ||
19 | (package emacs-next-pgtk) | ||
20 | "Emacs packages")) | ||
21 | |||
22 | (define (emacs-profile-service config) | ||
23 | (append (list emacs-org-roam-ui | ||
24 | emacs-lsp-mode! | ||
25 | (home-emacs-service-configuration-emacs-package | ||
26 | config)) | ||
27 | (specifications->packages '("emacs-sway" | ||
28 | "emacs-shackle" | ||
29 | "emacs-ytdl" | ||
30 | "emacs-desktop-environment" | ||
31 | "emacs-exwm" | ||
32 | "emacs-perspective" | ||
33 | "emacs-mu4e-alert" | ||
34 | "mu" | ||
35 | "isync" | ||
36 | "emacs-htmlize" | ||
37 | "emacs-bluetooth" | ||
38 | "emacs-nov-el" | ||
39 | "emacs-password-store" | ||
40 | "emacs-mastodon" | ||
41 | "emacs-elfeed" | ||
42 | "emacs-pdf-tools" | ||
43 | "emacs-emms" | ||
44 | "emacs-all-the-icons-dired" | ||
45 | "emacs-vterm" | ||
46 | "emacs-restclient" | ||
47 | "emacs-magit" | ||
48 | "emacs-neotree" | ||
49 | "emacs-projectile" | ||
50 | "emacs-company-box" | ||
51 | "emacs-company" | ||
52 | "emacs-docker" | ||
53 | "emacs-yaml-mode" | ||
54 | "emacs-web-mode" | ||
55 | "emacs-flycheck" | ||
56 | "emacs-tide" | ||
57 | "emacs-cider" | ||
58 | "emacs-typescript-mode" | ||
59 | "emacs-pyvenv" | ||
60 | "emacs-geiser-guile" | ||
61 | "emacs-racket-mode" | ||
62 | "emacs-geiser-racket" | ||
63 | "emacs-geiser" | ||
64 | "emacs-sly" | ||
65 | "emacs-rainbow-delimiters" | ||
66 | "emacs-paredit" | ||
67 | ;; "emacs-lsp-ivy" | ||
68 | ;; "emacs-lsp-mode" | ||
69 | "emacs-org-pomodoro" | ||
70 | "emacs-org-roam" | ||
71 | "emacs-org-roam-bibtex" | ||
72 | "emacs-org-superstar" | ||
73 | "emacs-org" | ||
74 | "emacs-ox-pandoc" | ||
75 | "emacs-beacon" | ||
76 | "emacs-all-the-icons" | ||
77 | "emacs-which-key" | ||
78 | "emacs-counsel" | ||
79 | "emacs-ivy" | ||
80 | "emacs-hl-todo" | ||
81 | "emacs-diminish" | ||
82 | "emacs-solarized-theme" | ||
83 | "font-terminus" | ||
84 | "emacs-undo-tree" | ||
85 | "emacs-hydra" | ||
86 | "emacs-multiple-cursors" | ||
87 | "emacs-general" | ||
88 | "emacs-guix" | ||
89 | "emacs-doom-modeline" | ||
90 | "emacs-use-package")))) | ||
91 | |||
92 | (define (emacs-shepherd-services config) | ||
93 | (list (shepherd-service | ||
94 | (documentation "Emacs daemon.") | ||
95 | (provision '(emacs)) | ||
96 | (start #~(make-forkexec-constructor | ||
97 | (list #$(file-append (home-emacs-service-configuration-emacs-package | ||
98 | config) | ||
99 | "/bin/emacs") | ||
100 | "--fg-daemon"))) | ||
101 | (stop #~(make-kill-destructor))))) | ||
102 | |||
103 | (define-public home-emacs-service-type | ||
104 | (service-type (name 'home-emacs) | ||
105 | (extensions (list (service-extension home-profile-service-type | ||
106 | emacs-profile-service) | ||
107 | (service-extension home-shepherd-service-type | ||
108 | emacs-shepherd-services) | ||
109 | )) | ||
110 | (default-value (home-emacs-service-configuration)) | ||
111 | (description "Runs emacs daemon service."))) | ||
112 | |||
diff --git a/guix/jd/packages/emacs.scm b/guix/jd/packages/emacs.scm new file mode 100644 index 0000000..0b9b19d --- /dev/null +++ b/guix/jd/packages/emacs.scm | |||
@@ -0,0 +1,57 @@ | |||
1 | (define-module (jd packages emacs) | ||
2 | #:use-module (gnu packages emacs-xyz) | ||
3 | #:use-module (gnu packages) | ||
4 | #:use-module (guix packages) | ||
5 | #:use-module (guix git-download) | ||
6 | #:use-module (guix build-system emacs) | ||
7 | #:use-module ((guix licenses) #:prefix license:) | ||
8 | #:export (emacs-org-roam-ui | ||
9 | emacs-lsp-mode!)) | ||
10 | |||
11 | |||
12 | (define emacs-org-roam-ui | ||
13 | (let ((commit "9474a254390b1e42488a1801fed5826b32a8030b") | ||
14 | (revision "0")) | ||
15 | (package | ||
16 | (name "emacs-org-roam-ui") | ||
17 | (version (git-version "0" revision commit)) | ||
18 | (source (origin | ||
19 | (method git-fetch) | ||
20 | (uri (git-reference | ||
21 | (url "https://github.com/org-roam/org-roam-ui") | ||
22 | (commit commit))) | ||
23 | (file-name (git-file-name name version)) | ||
24 | (sha256 | ||
25 | (base32 | ||
26 | "0v54vxh95izch74wz2dl2dkdqicbvshra55l6qvd4xl5qmfhpjdc")))) | ||
27 | (build-system emacs-build-system) | ||
28 | (arguments | ||
29 | `(#:include (cons "^out" %default-include))) | ||
30 | (propagated-inputs | ||
31 | (list emacs-org-roam emacs-websocket emacs-simple-httpd emacs-f)) | ||
32 | (home-page "https://github.com/org-roam/org-roam-ui") | ||
33 | (synopsis "A graphical frontend for your org-roam Zettelkasten") | ||
34 | (description " Org-Roam-UI is a frontend for exploring and interacting | ||
35 | with your @code{org-roam} notes. It is meant a successor of | ||
36 | @code{org-roam-server} that extends functionality of org-roam with a Web app | ||
37 | that runs side-by-side with Emacs.") | ||
38 | (license license:gpl3+)))) | ||
39 | |||
40 | |||
41 | |||
42 | (define emacs-lsp-mode! | ||
43 | (let ((commit "808c4d0ab9f19bb92c56716cf59df89432b63f5d") | ||
44 | (revision "1")) | ||
45 | (package | ||
46 | (inherit emacs-lsp-mode) | ||
47 | (name "emacs-lsp-mode") | ||
48 | (version (git-version "8.0.1" revision commit)) | ||
49 | (source | ||
50 | (origin | ||
51 | (method git-fetch) | ||
52 | (uri (git-reference | ||
53 | (url "https://github.com/emacs-lsp/lsp-mode") | ||
54 | (commit commit))) | ||
55 | (file-name (git-file-name name version)) | ||
56 | (sha256 | ||
57 | (base32 "0ridjhzndwjj8947vabq05njgnns74hi69x77axgcbv1c4nasz2y"))))))) | ||
diff --git a/guix/jd/utils.scm b/guix/jd/utils.scm index 5be7fa9..f4a35c1 100644 --- a/guix/jd/utils.scm +++ b/guix/jd/utils.scm | |||
@@ -3,15 +3,24 @@ | |||
3 | 3 | ||
4 | ;; This code is copied and modified from (gnu packages) module. | 4 | ;; This code is copied and modified from (gnu packages) module. |
5 | 5 | ||
6 | (define %jd-patch-path | 6 | (define (make-custom-load-path dir-path) |
7 | (make-parameter | 7 | (make-parameter |
8 | (map (lambda (directory) | 8 | (map (lambda (directory) |
9 | (let ((jd-patch-dir (string-append directory "/jd/packages/patches"))) | 9 | (let ((custom-dir (string-append directory dir-path))) |
10 | (if (and (file-exists? jd-patch-dir) | 10 | (if (and (file-exists? custom-dir) |
11 | (file-is-directory? jd-patch-dir)) | 11 | (file-is-directory? custom-dir)) |
12 | jd-patch-dir | 12 | custom-dir |
13 | directory))) | 13 | directory))) |
14 | %load-path))) | 14 | %load-path))) |
15 | |||
16 | (define (make-custom-searcher load-path) | ||
17 | (lambda (file-name) | ||
18 | (or (search-path (load-path) file-name) | ||
19 | (raise (string-append file-name | ||
20 | ": not found"))))) | ||
21 | |||
22 | (define %jd-patch-path (make-custom-load-path "/jd/packages/patches")) | ||
23 | (define %jd-dot-files-path (make-custom-load-path "/jd/home/services/dotfiles")) | ||
15 | 24 | ||
16 | (define (jd-search-patch file-name) | 25 | (define (jd-search-patch file-name) |
17 | "Search the patch FILE-NAME. Raise an error if not found." | 26 | "Search the patch FILE-NAME. Raise an error if not found." |