summaryrefslogtreecommitdiffstats
path: root/guix/jd/home
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2023-07-10 20:04:37 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2023-07-10 20:04:37 +0200
commitd857c1cd7aa56de8721c8b8a75b204deb87fd40b (patch)
treee2264e7b525370810b0f3a2fe8b1f1c3c242ed6c /guix/jd/home
parentf4232b4e088dec9c642e39846ab30e1303f53cb4 (diff)
downloaddotfiles-d857c1cd7aa56de8721c8b8a75b204deb87fd40b.tar.gz
dotfiles-d857c1cd7aa56de8721c8b8a75b204deb87fd40b.zip
Add systrays as a shepherd service.
Diffstat (limited to 'guix/jd/home')
-rw-r--r--guix/jd/home/services/desktop.scm54
-rw-r--r--guix/jd/home/services/udiskie.scm31
2 files changed, 54 insertions, 31 deletions
diff --git a/guix/jd/home/services/desktop.scm b/guix/jd/home/services/desktop.scm
new file mode 100644
index 0000000..bb4916e
--- /dev/null
+++ b/guix/jd/home/services/desktop.scm
@@ -0,0 +1,54 @@
1(define-module (jd home services desktop)
2 #:use-module (gnu packages)
3 #:use-module (gnu packages freedesktop)
4 #:use-module (gnu packages networking)
5 #:use-module (gnu packages syncthing)
6 #:use-module (gnu packages gnome)
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 #:use-module (guix gexp))
13
14(define (desktop-profile-service config)
15 (specifications->packages '("udiskie"
16 "syncthing-gtk"
17 "network-manager-applet")))
18
19(define (desktop-shepherd-services config)
20 (list (shepherd-service
21 (documentation "Udiskie daemon with tray.")
22 (provision '(udiskie))
23 (start #~(make-forkexec-constructor
24 (list #$(file-append udiskie
25 "/bin/udiskie")
26 "-t")))
27 (stop #~(make-kill-destructor)))
28
29 (shepherd-service
30 (documentation "Syncthing daemon with tray.")
31 (provision '(syncthing-gtk))
32 (start #~(make-forkexec-constructor
33 (list #$(file-append syncthing-gtk
34 "/bin/syncthing-gtk")
35 "-m")))
36 (stop #~(make-kill-destructor)))
37
38 (shepherd-service
39 (documentation "NetworkManager tray.")
40 (provision '(nm-applet))
41 (start #~(make-forkexec-constructor
42 (list #$(file-append network-manager-applet
43 "/bin/nm-applet"))))
44 (stop #~(make-kill-destructor)))))
45
46(define-public home-desktop-service-type
47 (service-type (name 'home-udiskie)
48 (extensions (list (service-extension home-profile-service-type
49 desktop-profile-service)
50 (service-extension home-shepherd-service-type
51 desktop-shepherd-services)))
52 (default-value #f)
53 (description "Runs desktop services.")))
54
diff --git a/guix/jd/home/services/udiskie.scm b/guix/jd/home/services/udiskie.scm
deleted file mode 100644
index ac8a16a..0000000
--- a/guix/jd/home/services/udiskie.scm
+++ /dev/null
@@ -1,31 +0,0 @@
1(define-module (jd home services udiskie)
2 #:use-module (gnu packages)
3 #:use-module (gnu packages freedesktop)
4 #:use-module (gnu services)
5 #:use-module (gnu services configuration)
6 #:use-module (gnu home services)
7 #:use-module (gnu home services shepherd)
8 #:use-module (guix gexp))
9
10(define (udiskie-profile-service config)
11 (specifications->packages '("udiskie")))
12
13(define (udiskie-shepherd-service config)
14 (list (shepherd-service
15 (documentation "udiskie daemon")
16 (provision '(udiskie))
17 (start #~(make-forkexec-constructor
18 (list #$(file-append udiskie
19 "/bin/udiskie")
20 "-t")))
21 (stop #~(make-kill-destructor)))))
22
23(define-public home-udiskie-service-type
24 (service-type (name 'home-udiskie)
25 (extensions (list (service-extension home-profile-service-type
26 udiskie-profile-service)
27 (service-extension home-shepherd-service-type
28 udiskie-shepherd-service)))
29 (default-value #f)
30 (description "Runs udiskie daemon.")))
31