home: services: Support mapping of System services to Home services.

* gnu/home/services.scm (service-type-mapping)
(system->home-service-type): New procedures.
(define-service-type-mapping, define-service-type-mappings): New macros.
(%system/home-service-type-mapping): New variable.
<top level>: Use 'define-service-type-mappings'.
* gnu/home/services/shepherd.scm <top level>: Likewise.
This commit is contained in:
Ludovic Courtès 2023-08-06 18:25:22 +02:00
parent dff7d2468f
commit 161d010d40
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 71 additions and 2 deletions

View file

@ -141,7 +141,7 @@ as shepherd package."
(define (shepherd-xdg-configuration-files config)
`(("shepherd/init.scm" ,(home-shepherd-configuration-file config))))
(define-public home-shepherd-service-type
(define home-shepherd-service-type
(service-type (name 'home-shepherd)
(extensions
(list (service-extension
@ -168,4 +168,6 @@ as shepherd package."
(default-value (home-shepherd-configuration))
(description "Configure and install userland Shepherd.")))
(define-service-type-mapping
shepherd-root-service-type => home-shepherd-service-type)