From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qIiLB5r+2F6oTwAA0tVLHw (envelope-from ) for ; Thu, 04 Jun 2020 14:00:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gDNYA5r+2F7rWAAA1q6Kng (envelope-from ) for ; Thu, 04 Jun 2020 14:00:58 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 26F3F94134A for ; Thu, 4 Jun 2020 14:00:37 +0000 (UTC) Received: from localhost ([::1]:43468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgqQ8-0002Ki-4k for larch@yhetil.org; Thu, 04 Jun 2020 10:00:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgqPe-0001ST-BE for bug-guix@gnu.org; Thu, 04 Jun 2020 10:00:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35607) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgqPd-00026m-VY for bug-guix@gnu.org; Thu, 04 Jun 2020 10:00:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jgqPd-0004ZH-Vr for bug-guix@gnu.org; Thu, 04 Jun 2020 10:00:05 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41541: [PATCH 7/8] services: hurd: Add `hurd-etc-service'. Resent-From: "Jan (janneke) Nieuwenhuizen" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 04 Jun 2020 14:00:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41541 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 41541@debbugs.gnu.org Received: via spool by 41541-submit@debbugs.gnu.org id=B41541.159127918017435 (code B ref 41541); Thu, 04 Jun 2020 14:00:05 +0000 Received: (at 41541) by debbugs.gnu.org; 4 Jun 2020 13:59:40 +0000 Received: from localhost ([127.0.0.1]:47145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgqPE-0004X4-HY for submit@debbugs.gnu.org; Thu, 04 Jun 2020 09:59:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgqP6-0004VY-L3 for 41541@debbugs.gnu.org; Thu, 04 Jun 2020 09:59:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33098) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgqP1-0001vc-B4; Thu, 04 Jun 2020 09:59:27 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=43728 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jgqP0-0000GG-Ip; Thu, 04 Jun 2020 09:59:26 -0400 From: "Jan (janneke) Nieuwenhuizen" Date: Thu, 4 Jun 2020 15:59:13 +0200 Message-Id: <20200604135914.4499-8-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200604135914.4499-1-janneke@gnu.org> References: <20200604135914.4499-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: m2KgTWZ1Vtov * 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 +;;; +;;; 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 . + +(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: + + +;;; +;;; The ETC service for the Hurd. +;;; + +(define (hurd-etc-service os) + "Return a 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