From d857c1cd7aa56de8721c8b8a75b204deb87fd40b Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Mon, 10 Jul 2023 20:04:37 +0200 Subject: Add systrays as a shepherd service. --- guix/jd/home/services/desktop.scm | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 guix/jd/home/services/desktop.scm (limited to 'guix/jd/home/services/desktop.scm') 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 @@ +(define-module (jd home services desktop) + #:use-module (gnu packages) + #:use-module (gnu packages freedesktop) + #:use-module (gnu packages networking) + #:use-module (gnu packages syncthing) + #:use-module (gnu packages gnome) + #:use-module (gnu services) + #:use-module (gnu services configuration) + #:use-module (gnu home services) + #:use-module (gnu home services shepherd) + #:use-module (gnu home services desktop) + #:use-module (guix gexp)) + +(define (desktop-profile-service config) + (specifications->packages '("udiskie" + "syncthing-gtk" + "network-manager-applet"))) + +(define (desktop-shepherd-services config) + (list (shepherd-service + (documentation "Udiskie daemon with tray.") + (provision '(udiskie)) + (start #~(make-forkexec-constructor + (list #$(file-append udiskie + "/bin/udiskie") + "-t"))) + (stop #~(make-kill-destructor))) + + (shepherd-service + (documentation "Syncthing daemon with tray.") + (provision '(syncthing-gtk)) + (start #~(make-forkexec-constructor + (list #$(file-append syncthing-gtk + "/bin/syncthing-gtk") + "-m"))) + (stop #~(make-kill-destructor))) + + (shepherd-service + (documentation "NetworkManager tray.") + (provision '(nm-applet)) + (start #~(make-forkexec-constructor + (list #$(file-append network-manager-applet + "/bin/nm-applet")))) + (stop #~(make-kill-destructor))))) + +(define-public home-desktop-service-type + (service-type (name 'home-udiskie) + (extensions (list (service-extension home-profile-service-type + desktop-profile-service) + (service-extension home-shepherd-service-type + desktop-shepherd-services))) + (default-value #f) + (description "Runs desktop services."))) + -- cgit v1.2.3