summaryrefslogtreecommitdiff
path: root/gnu/services.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services.scm')
-rw-r--r--gnu/services.scm50
1 files changed, 25 insertions, 25 deletions
diff --git a/gnu/services.scm b/gnu/services.scm
index 097bfed5f1b..5f987f55a52 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -26,6 +26,31 @@
26;;; You should have received a copy of the GNU General Public License 26;;; You should have received a copy of the GNU General Public License
27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. 27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 28
29;;; Commentary:
30;;;
31;;; This module defines a broad notion of "service types" and "services."
32;;;
33;;; A service type describe how its instances extend instances of other
34;;; service types. For instance, some services extend the instance of
35;;; ACCOUNT-SERVICE-TYPE by providing it with accounts and groups to create;
36;;; others extend SHEPHERD-ROOT-SERVICE-TYPE by passing it instances of
37;;; <shepherd-service>.
38;;;
39;;; When applicable, the service type defines how it can itself be extended,
40;;; by providing one procedure to compose extensions, and one procedure to
41;;; extend itself.
42;;;
43;;; A notable service type is SYSTEM-SERVICE-TYPE, which has a single
44;;; instance, which is the root of the service DAG. Its value is the
45;;; derivation that produces the 'system' directory as returned by
46;;; 'operating-system-derivation'.
47;;;
48;;; The 'fold-services' procedure can be passed a list of procedures, which it
49;;; "folds" by propagating extensions down the graph; it returns the root
50;;; service after the applying all its extensions.
51;;;
52;;; Code:
53
29(define-module (gnu services) 54(define-module (gnu services)
30 #:use-module (guix derivations) 55 #:use-module (guix derivations)
31 #:use-module (guix gexp) 56 #:use-module (guix gexp)
@@ -149,31 +174,6 @@
149 ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26805#16>. 174 ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26805#16>.
150 delete)) 175 delete))
151 176
152;;; Comment:
153;;;
154;;; This module defines a broad notion of "service types" and "services."
155;;;
156;;; A service type describe how its instances extend instances of other
157;;; service types. For instance, some services extend the instance of
158;;; ACCOUNT-SERVICE-TYPE by providing it with accounts and groups to create;
159;;; others extend SHEPHERD-ROOT-SERVICE-TYPE by passing it instances of
160;;; <shepherd-service>.
161;;;
162;;; When applicable, the service type defines how it can itself be extended,
163;;; by providing one procedure to compose extensions, and one procedure to
164;;; extend itself.
165;;;
166;;; A notable service type is SYSTEM-SERVICE-TYPE, which has a single
167;;; instance, which is the root of the service DAG. Its value is the
168;;; derivation that produces the 'system' directory as returned by
169;;; 'operating-system-derivation'.
170;;;
171;;; The 'fold-services' procedure can be passed a list of procedures, which it
172;;; "folds" by propagating extensions down the graph; it returns the root
173;;; service after the applying all its extensions.
174;;;
175;;; Code:
176
177(define-record-type <service-extension> 177(define-record-type <service-extension>
178 (service-extension target compute) 178 (service-extension target compute)
179 service-extension? 179 service-extension?