guix-commits
[Top][All Lists]
Advanced

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

branch master updated: services: childhurd: Always include the secret-se


From: guix-commits
Subject: branch master updated: services: childhurd: Always include the secret-service.
Date: Wed, 02 Sep 2020 01:26:47 -0400

This is an automated email from the git hooks/post-receive script.

janneke pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 18a9c16  services: childhurd: Always include the secret-service.
18a9c16 is described below

commit 18a9c16b5e067c9737452eb014ab80b5d1ffb915
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Wed Sep 2 07:13:15 2020 +0200

    services: childhurd: Always include the secret-service.
    
    * gnu/services/virtualization.scm (secret-service-operating-system): New
    procedure.
    (hurd-vm-disk-image): Use it to ensure a Childhurd always includes the
    secret-service.
    (%hurd-vm-operating-system): Remove secret-service.
    
    Co-authored-by: Ludovic Courtès <ludo@gnu.org>
---
 gnu/services/virtualization.scm | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index 75fe203..20e104f 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -835,6 +835,14 @@ over TCP.  Reboot upon failure."
 boot time.  This service is meant to be used by virtual machines (VMs) that
 can only be accessed by their host.")))
 
+(define (secret-service-operating-system os)
+  "Return an operating system based on OS that includes the secret-service,
+that will be listening to receive secret keys on port 1004, TCP."
+  (operating-system
+    (inherit os)
+    (services (cons (service secret-service-type 1004)
+                    (operating-system-user-services os)))))
+
 
 ;;;
 ;;; The Hurd in VM service: a Childhurd.
@@ -850,8 +858,6 @@ can only be accessed by their host.")))
                  (target "/dev/vda")
                  (timeout 0)))
     (services (cons*
-               ;; Receive secret keys on port 1004, TCP.
-               (service secret-service-type 1004)
                (service openssh-service-type
                         (openssh-configuration
                          (openssh openssh-sans-x)
@@ -887,8 +893,9 @@ can only be accessed by their host.")))
                (default "/etc/childhurd")))
 
 (define (hurd-vm-disk-image config)
-  "Return a disk-image for the Hurd according to CONFIG."
-  (let ((os (hurd-vm-configuration-os config))
+  "Return a disk-image for the Hurd according to CONFIG.  The secret-service
+is added to the OS specified in CONFIG."
+  (let ((os (secret-service-operating-system (hurd-vm-configuration-os 
config)))
         (disk-size (hurd-vm-configuration-disk-size config)))
     (system-image
      (image



reply via email to

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