diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-05-10 23:33:52 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-05-10 23:33:52 +0200 |
commit | 023f391c7860d21aee9e9b3e601d7a81bb5d128d (patch) | |
tree | e4567181f1bd1a1a14fa646501503794a68c3f8d /gnu/system.scm | |
parent | 23ed63a12d941ad836f3fc9902ba4f145db1975c (diff) | |
download | patches-023f391c7860d21aee9e9b3e601d7a81bb5d128d.tar patches-023f391c7860d21aee9e9b3e601d7a81bb5d128d.tar.gz |
services: Add 'file-system-service'.
* gnu/services/base.scm (file-system-service): New procedure.
(user-processes-service): Add 'requirements' parameter.
* gnu/services/dmd.scm (dmd-configuration-file): Use (guix build
linux-initrd).
* guix/build/linux-initrd.scm (guix): Export 'check-file-system'.
* gnu/system.scm (file-union): New procedure.
(essential-services): Use it. Add that to the returned list.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r-- | gnu/system.scm | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/gnu/system.scm b/gnu/system.scm index 491e0ed7ae..d76c3670f0 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -184,15 +184,35 @@ file." (gexp->derivation name builder)) +(define (other-file-system-services os) + "Return file system services for the file systems of OS that are not marked +as 'needed-for-boot'." + (define file-systems + (remove (lambda (fs) + (or (file-system-needed-for-boot? fs) + (string=? "/" (file-system-mount-point fs)))) + (operating-system-file-systems os))) + + (sequence %store-monad + (map (match-lambda + (($ <file-system> device target type flags opts #f check?) + (file-system-service device target type + #:check? check? + #:options opts))) + file-systems))) + (define (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 bookkeeping." - (mlet %store-monad ((procs (user-processes-service)) - (root-fs (root-file-system-service)) - (host-name (host-name-service - (operating-system-host-name os)))) - (return (list host-name procs root-fs)))) + (mlet* %store-monad ((root-fs (root-file-system-service)) + (other-fs (other-file-system-services os)) + (procs (user-processes-service + (map (compose first service-provision) + other-fs))) + (host-name (host-name-service + (operating-system-host-name os)))) + (return (cons* host-name procs root-fs other-fs)))) (define (operating-system-services os) "Return all the services of OS, including \"internal\" services that do not |