summaryrefslogtreecommitdiffstats
path: root/src/jd/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/jd/features')
-rw-r--r--src/jd/features/state.scm25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/jd/features/state.scm b/src/jd/features/state.scm
new file mode 100644
index 0000000..ef8620b
--- /dev/null
+++ b/src/jd/features/state.scm
@@ -0,0 +1,25 @@
1(define-module (jd features state)
2 #:use-module (guix gexp)
3 #:use-module (ice-9 match)
4 #:use-module (gnu services)
5 #:use-module (gnu home-services state)
6 #:use-module (rde features))
7
8(define-public (feature-state states)
9 (define f-name 'state)
10
11 (define (get-home-services config)
12 (list
13 (simple-service
14 'user-state
15 home-state-service-type
16 (map
17 (match-lambda
18 (('git local remote) (state-git local remote))
19 (#t (error "State not found")))
20 states))))
21
22 (feature
23 (name f-name)
24 (values `((,f-name . #t)))
25 (home-services-getter get-home-services)))