aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/cuirass.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-02-22 15:41:06 +0100
committerMathieu Othacehe <othacehe@gnu.org>2021-02-23 09:45:09 +0100
commitbebcf97600b2fa65482ae8ee870800dafa34d3f8 (patch)
tree0d17f4b5c673df84838f49a85209d91006041035 /gnu/services/cuirass.scm
parent602f86d60bfd29bc4fd7f86fd9f92a37c0497f55 (diff)
downloadguix-bebcf97600b2fa65482ae8ee870800dafa34d3f8.tar
guix-bebcf97600b2fa65482ae8ee870800dafa34d3f8.tar.gz
services: cuirass: Improve simple-cuirass-services.
Instead of returning multiple services in simple-cuirass-services, rely on the instantiate-missing-services procedure to instantiate postgresql and postgresql-role-service-type when missing. Turn simple-cuirass-services procedure into simple-cuirass-configuration->specs, that takes a simple-cuirass-configuration record and returns a Cuirass specification. Suggested-by: Ludovic Courtès <ludo@gnu.org> * gnu/services/cuirass.scm (%default-cuirass-config): Remove it. (simple-cuirass-services): Rename it to ... (simple-cuirass-configuration->specs): ... this procedure. * gnu/tests/cuirass.scm (cuirass-services): Remove postgresql and postgresql-role services that are automatically instantiated. (simple-cuirass-service): New variable. (%cuirass-simple-test): Adapt it to use simple-cuirass-configuration->specs instead of simple-cuirass-services. * doc/guix.texi (Simple Cuirass): Update it.
Diffstat (limited to 'gnu/services/cuirass.scm')
-rw-r--r--gnu/services/cuirass.scm22
1 files changed, 3 insertions, 19 deletions
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index 18163b59e2..b962f2f80a 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -60,8 +60,7 @@
simple-cuirass-configuration
simple-cuirass-configuration?
- %default-cuirass-config
- simple-cuirass-services))
+ simple-cuirass-configuration->specs))
;;;; Commentary:
;;;
@@ -419,13 +418,7 @@ CONFIG."
(systems simple-cuirass-configuration-systems
(default (list (%current-system))))) ;list of strings
-(define %default-cuirass-config
- (cuirass-configuration
- (specifications #~())))
-
-(define* (simple-cuirass-services config
- #:optional
- (cuirass %default-cuirass-config))
+(define* (simple-cuirass-configuration->specs config)
(define (format-name name)
(if (string? name)
name
@@ -475,13 +468,4 @@ CONFIG."
(#:build-outputs . ())
(#:priority . 1))))
- (list
- (service cuirass-service-type
- (cuirass-configuration
- (inherit cuirass)
- (specifications #~(list
- '#$(config->spec config)))))
- (service postgresql-service-type
- (postgresql-configuration
- (postgresql postgresql-10)))
- (service postgresql-role-service-type)))
+ #~(list '#$(config->spec config)))