unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
To: 41541@debbugs.gnu.org
Subject: bug#41541: [PATCH 7/8] services: hurd: Add `hurd-etc-service'.
Date: Thu,  4 Jun 2020 15:59:13 +0200	[thread overview]
Message-ID: <20200604135914.4499-8-janneke@gnu.org> (raw)
In-Reply-To: <20200604135914.4499-1-janneke@gnu.org>

* gnu/services/hurd.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (Hurd Services): Document it.
---
 doc/guix.texi         | 13 +++++++++
 gnu/local.mk          |  1 +
 gnu/services/hurd.scm | 61 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 75 insertions(+)
 create mode 100644 gnu/services/hurd.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index 4776eacacd..97bf067074 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -319,7 +319,9 @@ Services
 * Version Control Services::    Providing remote access to Git repositories.
 * Game Services::               Game servers.
 * PAM Mount Service::           Service to mount volumes when logging in.
+* Guix Services::               Services relating specifically to Guix.
 * Linux Services::              Services tied to the Linux kernel.
+* Hurd Services::               Services specific to a Hurd System.
 * Miscellaneous Services::      Other services.
 
 Defining Services
@@ -12594,6 +12596,7 @@ declaration.
 * PAM Mount Service::           Service to mount volumes when logging in.
 * Guix Services::               Services relating specifically to Guix.
 * Linux Services::              Services tied to the Linux kernel.
+* Hurd Services::               Services specific for a Hurd System.
 * Miscellaneous Services::      Other services.
 @end menu
 
@@ -26032,6 +26035,16 @@ parameters, can be done as follow:
 @end lisp
 @end deffn
 
+@node Hurd Services
+@subsection Hurd Services
+
+@deffn {Scheme Procedure} hurd-etc-service @var{os}
+This service implements a minimal @code{etc-service}, adding some
+specifics for the Hurd.
+
+It is part of the @code{hurd-default-essential-services}.
+@end deffn
+
 @node Miscellaneous Services
 @subsection Miscellaneous Services
 
diff --git a/gnu/local.mk b/gnu/local.mk
index 8abca8659e..d1d086abe0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -582,6 +582,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/services/games.scm			\
   %D%/services/getmail.scm				\
   %D%/services/guix.scm			\
+  %D%/services/hurd.scm				\
   %D%/services/kerberos.scm			\
   %D%/services/linux.scm			\
   %D%/services/lirc.scm				\
diff --git a/gnu/services/hurd.scm b/gnu/services/hurd.scm
new file mode 100644
index 0000000000..6e57b22810
--- /dev/null
+++ b/gnu/services/hurd.scm
@@ -0,0 +1,61 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu services hurd)
+  #:use-module (gnu packages admin)
+  #:use-module (gnu services)
+  #:use-module (gnu system)
+  #:use-module (guix gexp)
+  #:use-module (guix records)
+  #:export (hurd-etc-service))
+
+;;; Commentary:
+;;;
+;;; This module implements services for the Hurd.
+;;;
+;;; Code:
+
+\f
+;;;
+;;; The ETC service for the Hurd.
+;;;
+
+(define (hurd-etc-service os)
+  "Return a <service> that builds containing the static part of the /etc
+directory."
+  (let ((profile (mixed-text-file "profile"  "\
+# Generated by hurd-etc-services
+export PS1='\\u@\\h\\$ '
+
+GUIX_PROFILE=\"/run/current-system/profile\"
+. \"$GUIX_PROFILE/etc/profile\"
+
+GUIX_PROFILE=\"$HOME/.guix-profile\"
+if [ -f \"$GUIX_PROFILE/etc/profile\" ]; then
+  . \"$GUIX_PROFILE/etc/profile\"
+fi\n"))
+        (hurd (operating-system-hurd os)))
+    (etc-service
+     `(("services" ,(file-append net-base "/etc/services"))
+       ("protocols" ,(file-append net-base "/etc/protocols"))
+       ("profile" ,profile)
+       ("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
+       ("login" ,(file-append hurd "/etc/login"))
+       ("motd" ,(file-append hurd "/etc/motd"))))))
+
+;;; hurd.scm ends here
-- 
2.26.2





  parent reply	other threads:[~2020-06-04 14:00 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 14:21 bug#41541: merge wip-hurd-vm Jan Nieuwenhuizen
2020-05-27 10:01 ` Mathieu Othacehe
2020-05-27 11:11   ` Jan Nieuwenhuizen
2020-05-30 14:40   ` Jan Nieuwenhuizen
2020-06-02  8:48     ` Mathieu Othacehe
2020-06-02  9:24       ` Jan Nieuwenhuizen
2020-06-02 10:16         ` Mathieu Othacehe
2020-06-02 12:23           ` Jan Nieuwenhuizen
2020-06-02 12:40             ` Ludovic Courtès
2020-06-02 13:39               ` Jan Nieuwenhuizen
2020-06-03  9:18                 ` Ludovic Courtès
2020-06-03 15:22                   ` Jan Nieuwenhuizen
2020-06-03 15:38                     ` Mathieu Othacehe
2020-06-03 20:27                       ` Jan Nieuwenhuizen
2020-06-04  9:32                         ` Ludovic Courtès
2020-06-04 11:33                           ` Jan Nieuwenhuizen
2020-06-05 16:08                             ` Ludovic Courtès
2020-06-05 16:24                               ` Jan Nieuwenhuizen
2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 1/8] system: Add 'hurd' field to <operating-system> Jan (janneke) Nieuwenhuizen
2020-06-06  7:21     ` Mathieu Othacehe
2020-06-06  8:26       ` Jan Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 2/8] bootloader: Extend `<menu-entry>' for multiboot Jan (janneke) Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 3/8] system: Add 'multiboot-modules' field to <boot-parameters> Jan (janneke) Nieuwenhuizen
2020-06-06  7:32     ` Mathieu Othacehe
2020-06-06 10:13       ` Jan Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 4/8] bootloader: grub: Add support for multiboot Jan (janneke) Nieuwenhuizen
2020-06-06  7:47     ` Mathieu Othacehe
2020-06-06  8:46       ` Jan Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 5/8] system: Use 'hurd' package in label Jan (janneke) Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 6/8] system: examples: Add bare-hurd.tmpl Jan (janneke) Nieuwenhuizen
2020-06-06  7:56     ` Mathieu Othacehe
2020-06-04 13:59   ` Jan (janneke) Nieuwenhuizen [this message]
2020-06-04 13:59   ` bug#41541: [PATCH 8/8] system: Add `hurd-activation' Jan (janneke) Nieuwenhuizen
2020-06-06  8:03     ` Mathieu Othacehe
2020-06-06  8:54       ` Jan Nieuwenhuizen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200604135914.4499-8-janneke@gnu.org \
    --to=janneke@gnu.org \
    --cc=41541@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).