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/home/services/desktop.scm | |
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/home/services/desktop.scm')
-rw-r--r-- | guix/jd/home/services/desktop.scm | 178 |
1 files changed, 146 insertions, 32 deletions
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 | ||