diff options
Diffstat (limited to 'guix/jd/home/services/udiskie.scm')
-rw-r--r-- | guix/jd/home/services/udiskie.scm | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/guix/jd/home/services/udiskie.scm b/guix/jd/home/services/udiskie.scm new file mode 100644 index 0000000..ac8a16a --- /dev/null +++ b/guix/jd/home/services/udiskie.scm | |||
@@ -0,0 +1,31 @@ | |||
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 | |||