[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
21/42: services: Add hurd-ttys-service-type.
From: |
guix-commits |
Subject: |
21/42: services: Add hurd-ttys-service-type. |
Date: |
Sat, 25 Apr 2020 13:45:05 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 164bdebac1e34922035202c9a0af97fde4bc9656
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Mon Apr 13 10:36:56 2020 +0200
services: Add hurd-ttys-service-type.
* gnu/services/hurd.scm (<hurd-ttys-configuration>): New variable.
(hurd-ttys-shepherd-service, hurd-ttys-service-type): New function.
(hurd-service->shepherd-service): Add entry.
---
gnu/services/hurd.scm | 45 +++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 43 insertions(+), 2 deletions(-)
diff --git a/gnu/services/hurd.scm b/gnu/services/hurd.scm
index 34a8118..3394b79 100644
--- a/gnu/services/hurd.scm
+++ b/gnu/services/hurd.scm
@@ -26,8 +26,11 @@
#:use-module (guix records)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
- #:export (hurd-console-service-type
- hurd-service->shepherd-service))
+ #:export (hurd-console-configuration
+ hurd-console-service-type
+ hurd-service->shepherd-service
+ hurd-ttys-configuration
+ hurd-ttys-service-type))
;;; Commentary:
;;;
@@ -40,6 +43,7 @@
(let ((config (service-value service)))
(match config
(($ <hurd-console-configuration>) (hurd-console-shepherd-service config))
+ (($ <hurd-ttys-configuration>) (hurd-ttys-shepherd-service config))
(_ '()))))
@@ -83,4 +87,41 @@
(extend append)
(default-value (hurd-console-configuration))))
+
+;;;
+;;; Simple wrapper for <hurd>/libexec/runttys.
+;;;
+
+(define-record-type* <hurd-ttys-configuration>
+ hurd-ttys-configuration make-hurd-ttys-configuration
+ hurd-ttys-configuration?
+ (hurd hurd-ttys-configuration-hurd ;package
+ (default hurd)))
+
+(define (hurd-ttys-shepherd-service config)
+ "Return a <shepherd-service> for the Hurd ttys with CONFIG."
+
+ (define runttys-command
+ #~(list
+ (string-append #$(hurd-ttys-configuration-hurd config)
"/libexec/runttys")))
+
+ (list (shepherd-service
+ (documentation "Hurd ttys.")
+ (provision '(ttys))
+ (requirement '(console))
+ (start #~(lambda _ (fork+exec-command #$runttys-command) #t))
+ (stop #~(make-kill-destructor)))))
+
+(define hurd-ttys-service-type
+ (service-type
+ (name 'tty)
+ (description
+ "Run a hurd ttys, @command{runttys}.")
+ (extensions
+ (list (service-extension shepherd-root-service-type
+ hurd-ttys-shepherd-service)))
+ (compose concatenate)
+ (extend append)
+ (default-value (hurd-ttys-configuration))))
+
;;; hurd.scm ends here
- 05/42: gnu: guix: Cross-build fixup for wrap-program., (continued)
- 05/42: gnu: guix: Cross-build fixup for wrap-program., guix-commits, 2020/04/25
- 08/42: gnu: guix: Update to eeb87326d8., guix-commits, 2020/04/25
- 04/42: gnu: guix: Cross-build workaround: Run native guile for version., guix-commits, 2020/04/25
- 09/42: vm: Make the device node procedure a parameter., guix-commits, 2020/04/25
- 13/42: gnu: Add dde-sources., guix-commits, 2020/04/25
- 10/42: gnu: hurd: Build DDE libraries., guix-commits, 2020/04/25
- 14/42: gnu: Add netdde., guix-commits, 2020/04/25
- 17/42: system: hurd: Add less, which to %base-packages/hurd., guix-commits, 2020/04/25
- 18/42: system: hurd: Add /etc/group., guix-commits, 2020/04/25
- 15/42: gnu: hurd: Add NFS support., guix-commits, 2020/04/25
- 21/42: services: Add hurd-ttys-service-type.,
guix-commits <=
- 24/42: services: hurd: Add dummy syslog., guix-commits, 2020/04/25
- 11/42: gnu: hurd: Fix references to /bin/w., guix-commits, 2020/04/25
- 12/42: gnu: hurd: Use default Qemu guest ip: 10.0.2.15., guix-commits, 2020/04/25
- 20/42: services: Add hurd-console-service-type., guix-commits, 2020/04/25
- 26/42: services: Add openssh-service as a Hurd service., guix-commits, 2020/04/25
- 22/42: services: Add hurd-user-services-service-type., guix-commits, 2020/04/25
- 23/42: services: Add guix-daemon-service as a Hurd service., guix-commits, 2020/04/25
- 29/42: system: hurd: Add openssh service., guix-commits, 2020/04/25
- 30/42: system: hurd: Create system profile for guix development., guix-commits, 2020/04/25
- 28/42: system: gnu: Populate "/etc" from "/boot/activation"., guix-commits, 2020/04/25