From b462f68c7f74d44cf409c447faabc25c955acd56 Mon Sep 17 00:00:00 2001 From: Jakub Dlugosz Date: Fri, 31 Oct 2025 12:56:16 +0100 Subject: Fix (gnu home-services state) and add feature-state --- src/jd/features/state.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/jd/features/state.scm (limited to 'src/jd/features/state.scm') 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 @@ +(define-module (jd features state) + #:use-module (guix gexp) + #:use-module (ice-9 match) + #:use-module (gnu services) + #:use-module (gnu home-services state) + #:use-module (rde features)) + +(define-public (feature-state states) + (define f-name 'state) + + (define (get-home-services config) + (list + (simple-service + 'user-state + home-state-service-type + (map + (match-lambda + (('git local remote) (state-git local remote)) + (#t (error "State not found"))) + states)))) + + (feature + (name f-name) + (values `((,f-name . #t))) + (home-services-getter get-home-services))) -- cgit v1.2.3