services: Add yggdrasil-service-type.
[jackhill/guix/guix.git] / gnu / services / shepherd.scm
index 655a45a..e14ceca 100644 (file)
    (extensions (list (service-extension boot-service-type
                                         shepherd-boot-gexp)
                      (service-extension profile-service-type
-                                        (const (list shepherd)))))))
+                                        (const (list shepherd)))))
+   (description
+    "Run the GNU Shepherd as PID 1---i.e., the operating system's first
+process.  The Shepherd takes care of managing services such as daemons by
+ensuring they are started and stopped in the right order.")))
 
 (define %shepherd-root-service
   ;; The root shepherd service, aka. PID 1.  Its parameter is a list of
@@ -142,7 +146,7 @@ DEFAULT is given, use it as the service's default value."
   ;; Default set of modules visible in a service's file.
   `((shepherd service)
     (oop goops)
-    (guix build utils)
+    ((guix build utils) #:hide (delete))
     (guix build syscalls)))
 
 (define-record-type* <shepherd-service>
@@ -262,8 +266,7 @@ stored."
 (define (scm->go file)
   "Compile FILE, which contains code to be loaded by shepherd's config file,
 and return the resulting '.go' file."
-  ;; FIXME: %current-target-system may not be bound <https://bugs.gnu.org/29296>
-  (let ((target (%current-target-system)))
+  (let-system (system target)
     (with-extensions (list shepherd)
       (computed-file (string-append (basename (scheme-file-name file) ".scm")
                                     ".go")
@@ -311,7 +314,9 @@ and return the resulting '.go' file."
           (call-with-error-handling
             (lambda ()
               (apply register-services
-                     (map load-compiled '#$(map scm->go files)))))
+                     (parameterize ((current-warning-port
+                                     (%make-void-port "w")))
+                       (map load-compiled '#$(map scm->go files))))))
 
           (format #t "starting services...~%")
           (for-each (lambda (service)