1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu services hurd)
20 #:use-module (gnu packages admin)
21 #:use-module (gnu packages hurd)
22 #:use-module (gnu services)
23 #:use-module (gnu services shepherd)
24 #:use-module (gnu system)
25 #:use-module (guix gexp)
26 #:use-module (guix records)
27 #:export (hurd-console-configuration
28 hurd-console-service-type))
32 ;;; This module implements services for the Hurd.
37 ;;; The Hurd VGA console service.
40 (define-record-type* <hurd-console-configuration>
41 hurd-console-configuration make-hurd-console-configuration
42 hurd-console-configuration?
43 (hurd hurd-console-configuration-hurd ;package
46 (define (hurd-console-shepherd-service config)
47 "Return a <shepherd-service> for a Hurd VGA console with CONFIG."
49 (define console-command
51 (string-append #$(hurd-console-configuration-hurd config) "/bin/console")
55 "-d" "generic_speaker"))
57 (list (shepherd-service
58 (documentation "Run the Hurd’s VGA console client.")
59 (provision '(console))
60 (requirement '(user-processes))
61 (start #~(make-forkexec-constructor #$console-command))
62 (stop #~(make-kill-destructor)))))
64 (define hurd-console-service-type
67 (description "Run the Hurd console client.")
69 (list (service-extension shepherd-root-service-type
70 hurd-console-shepherd-service)))
71 (default-value (hurd-console-configuration))))
73 ;;; hurd.scm ends here