[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
18/22: services: Add hurd-ttys-service-type.
From: |
guix-commits |
Subject: |
18/22: services: Add hurd-ttys-service-type. |
Date: |
Mon, 13 Apr 2020 09:20:50 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 2141f3e5a14e88a48bd5842495b34de0c8813da3
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 | 46 ++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 44 insertions(+), 2 deletions(-)
diff --git a/gnu/services/hurd.scm b/gnu/services/hurd.scm
index d20802e..647bf9b 100644
--- a/gnu/services/hurd.scm
+++ b/gnu/services/hurd.scm
@@ -27,10 +27,14 @@
#:use-module (guix records)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
- #:export (hurd-console-service-type
+ #:export (hurd-console-configuration
+ fancy?
+ hurd-console-service-type
hurd-service->shepherd-service
hurd-ssh-configuration
- hurd-ssh-service-type))
+ hurd-ssh-service-type
+ hurd-ttys-configuration
+ hurd-ttys-service-type))
;;; Commentary:
;;;
@@ -43,6 +47,7 @@
(let ((config (service-value service)))
(match config
(($ <hurd-console-configuration>) (hurd-console-shepherd-service config))
+ (($ <hurd-ttys-configuration>) (hurd-ttys-shepherd-service config))
(($ <openssh-configuration>) (hurd-ssh-shepherd-service config))
(_ '()))))
@@ -92,6 +97,43 @@
;;;
+;;; 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))))
+
+
+;;;
;;; Simplified OpenSSH. This removes loopback, syslogd and PAM dependencies.
;;; This package will be removed when the Hurd supports those.
;;;
- 03/22: HACK build.sh, 2GiB disk., (continued)
- 03/22: HACK build.sh, 2GiB disk., guix-commits, 2020/04/13
- 05/22: Revert "records: Have ABI check work well for cross-compilation.", guix-commits, 2020/04/13
- 02/22: system: hurd: Add guix., guix-commits, 2020/04/13
- 06/22: REMOVEME gnu: guix: Bugfix for cross compiling to the Hurd., guix-commits, 2020/04/13
- 04/22: Revert "compile: Run the load phase within 'with-target'.", guix-commits, 2020/04/13
- 08/22: build.sh: Disable daemon deduplication; builds gnu-make-boot0!, guix-commits, 2020/04/13
- 09/22: system: hurd: Bump image size to 10GiB., guix-commits, 2020/04/13
- 12/22: system: hurd: Add the Shepherd., guix-commits, 2020/04/13
- 11/22: system: hurd: Add openssh., guix-commits, 2020/04/13
- 15/22: DRAFT system: hurd: Start the Shepherd., guix-commits, 2020/04/13
- 18/22: services: Add hurd-ttys-service-type.,
guix-commits <=
- 14/22: gnu: python: Build fix for the Hurd., guix-commits, 2020/04/13
- 20/22: services: Register guix-daemon-service as a hurd service., guix-commits, 2020/04/13
- 16/22: services: Add hurd., guix-commits, 2020/04/13
- 13/22: gnu: coreutils: Mark three more tests XFAIL on the Hurd., guix-commits, 2020/04/13
- 19/22: services: Add hurd-user-services-service-type., guix-commits, 2020/04/13
- 21/22: system: hurd: Initial (gnu services) generated shepherd.conf., guix-commits, 2020/04/13
- 17/22: services: Add hurd-console-service-type., guix-commits, 2020/04/13
- 22/22: HACK use uncompiled .scm for shepherd, guix-commits, 2020/04/13