guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/05: system: Add hurd-operating-system-directory-base-entries.


From: guix-commits
Subject: 04/05: system: Add hurd-operating-system-directory-base-entries.
Date: Sun, 26 Apr 2020 05:50:59 -0400 (EDT)

janneke pushed a commit to branch wip-hurd-vm
in repository guix.

commit 25aa2a0eee945b229358bdc673186137189d57c8
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Sat Apr 25 23:13:57 2020 +0200

    system: Add hurd-operating-system-directory-base-entries.
    
    * gnu/system.scm (hurd-operating-system-directory-base-entries): New
    procedure.
    (hurd-default-essential-services): Use it.
---
 gnu/system.scm | 37 ++++++++++++++++++++++++-------------
 1 file changed, 24 insertions(+), 13 deletions(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index a600223..b3bcf89 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -516,6 +516,16 @@ value of the SYSTEM-SERVICE-TYPE service."
                 ("initrd" ,initrd)
                 ("locale" ,locale))))))   ;used by libc
 
+(define* (hurd-operating-system-directory-base-entries os)
+  "Return the basic entries of the 'system' directory of OS for use as the
+value of the SYSTEM-SERVICE-TYPE service."
+  (let ((locale (operating-system-locale-directory os)))
+    (mlet* %store-monad ((kernel -> (operating-system-kernel os))
+                         (params -> (operating-system-boot-parameters-file 
os)))
+      (return `(("kernel" ,kernel)
+                ("parameters" ,params)
+                ("locale" ,locale))))))
+
 (define (operating-system-default-essential-services os)
   "Return the list of essential services for OS.  These are special services
 that implement part of what's declared in OS are responsible for low-level
@@ -565,19 +575,20 @@ bookkeeping."
                                   (operating-system-firmware os)))))))
 
 (define (hurd-default-essential-services os)
-  (list (service system-service-type '())
-        %boot-service
-        %shepherd-root-service
-        %activation-service
-        (service user-processes-service-type '(user-processes))
-        (account-service (append (operating-system-accounts os)
-                                 (operating-system-groups os))
-                         (operating-system-skeletons os))
-        (service hurd-file-systems-service-type)
-        (pam-root-service (operating-system-pam-services os))
-        (hurd-etc-service os)
-        (service profile-service-type
-                 (operating-system-packages os))))
+  (let ((entries (warn 'hurd-entries 
(hurd-operating-system-directory-base-entries os))))
+    (list (service system-service-type entries)
+          %boot-service
+          %shepherd-root-service
+          %activation-service
+          (service user-processes-service-type '(user-processes))
+          (account-service (append (operating-system-accounts os)
+                                   (operating-system-groups os))
+                           (operating-system-skeletons os))
+          (service hurd-file-systems-service-type #f)
+          (pam-root-service (operating-system-pam-services os))
+          (hurd-etc-service os)
+          (service profile-service-type
+                   (operating-system-packages os)))))
 
 (define* (operating-system-services os)
   "Return all the services of OS, including \"essential\" services."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]