Skip to content
Snippets Groups Projects
Unverified Commit 18a9c16b authored by Jan (janneke) Nieuwenhuizen's avatar Jan (janneke) Nieuwenhuizen
Browse files

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: default avatarLudovic Courtès <ludo@gnu.org>
parent 450dcd1a
No related branches found
No related tags found
No related merge requests found
...@@ -835,6 +835,14 @@ (define secret-service-type ...@@ -835,6 +835,14 @@ (define secret-service-type
boot time. This service is meant to be used by virtual machines (VMs) that boot time. This service is meant to be used by virtual machines (VMs) that
can only be accessed by their host."))) 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. ;;; The Hurd in VM service: a Childhurd.
...@@ -850,8 +858,6 @@ (define %hurd-vm-operating-system ...@@ -850,8 +858,6 @@ (define %hurd-vm-operating-system
(target "/dev/vda") (target "/dev/vda")
(timeout 0))) (timeout 0)))
(services (cons* (services (cons*
;; Receive secret keys on port 1004, TCP.
(service secret-service-type 1004)
(service openssh-service-type (service openssh-service-type
(openssh-configuration (openssh-configuration
(openssh openssh-sans-x) (openssh openssh-sans-x)
...@@ -887,8 +893,9 @@ (define-record-type* <hurd-vm-configuration> ...@@ -887,8 +893,9 @@ (define-record-type* <hurd-vm-configuration>
(default "/etc/childhurd"))) (default "/etc/childhurd")))
(define (hurd-vm-disk-image config) (define (hurd-vm-disk-image config)
"Return a disk-image for the Hurd according to CONFIG." "Return a disk-image for the Hurd according to CONFIG. The secret-service
(let ((os (hurd-vm-configuration-os config)) 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))) (disk-size (hurd-vm-configuration-disk-size config)))
(system-image (system-image
(image (image
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment