services: Add the Guix Home service.

This patch adds a Guix Home service, which allows for configuring/deploying an
operating-system declaration with an associated home-environment.

* gnu/services/guix.scm: Add guix-home-service and guix-home-shepherd-service
* gnu/home/services/shepherd.scm: Don't attempt to launch user shepherd when
the system shepherd runs guix-home-<user>
* doc/guix.texi: Add documentation for guix-home-service
* gnu/tests/guix.scm: Add a test to verify guix-home-service-type is able to
activate a home environment

Change-Id: Ifbcc0878d934aa4abe34bb2123b5081fb432aa8e
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Richard Sent 2024-03-21 14:36:43 -04:00 committed by Ludovic Courtès
parent 9f8e92cc7d
commit 59bb53823e
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
4 changed files with 149 additions and 1 deletions

View file

@ -144,7 +144,12 @@ as shepherd package."
(format #f "/run/user/~a" (getuid)))
"/shepherd/socket"))
#$(reload-configuration-gexp config)
#$(launch-shepherd-gexp config)))
;; Don't attempt to start user shepherd if the system is running the
;; activation script. /run/user/<uid> may not have been created
;; yet. But do otherwise so if the runtime dir does not exist an error
;; is logged.
(unless (getenv "GUIX_SYSTEM_IS_RUNNING_HOME_ACTIVATE")
#$(launch-shepherd-gexp config))))
(define (shepherd-xdg-configuration-files config)
`(("shepherd/init.scm" ,(home-shepherd-configuration-file config))))