guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20/36: services: hurd: Move hurd-etc-sevcices.


From: guix-commits
Subject: 20/36: services: hurd: Move hurd-etc-sevcices.
Date: Fri, 1 May 2020 11:54:00 -0400 (EDT)

janneke pushed a commit to branch wip-hurd-vm
in repository guix.

commit 2302122eb95d63891a4a9c804bb80cd2a96d8ecc
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Sat Apr 25 11:55:56 2020 +0200

    services: hurd: Move hurd-etc-sevcices.
    
    * gnu/system/hurd.scm: Move hurd-etc-service
    (hurd-etc-service): from here ...
    gnu/services/hurd.scm (hurd-etc-service): ... to here.
---
 gnu/services/hurd.scm | 28 ++++++++++++++++++++++++++++
 gnu/system/hurd.scm   | 23 -----------------------
 2 files changed, 28 insertions(+), 23 deletions(-)

diff --git a/gnu/services/hurd.scm b/gnu/services/hurd.scm
index 5ba5062..3e2a72f 100644
--- a/gnu/services/hurd.scm
+++ b/gnu/services/hurd.scm
@@ -17,11 +17,13 @@
 ;;; 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 packages hurd)
   #:use-module (gnu packages ssh)
   #:use-module (gnu services)
   #:use-module (gnu services base)
   #:use-module (gnu services shepherd)
+  #:use-module (gnu system)
   #:use-module (gnu system shadow)
   #:use-module (guix gexp)
   #:use-module (guix modules)
@@ -31,6 +33,7 @@
   #:use-module (ice-9 match)
   #:export (hurd-console-configuration
             hurd-console-service-type
+            hurd-etc-service
             hurd-loopback-service-type
             hurd-service->shepherd-service
             hurd-ttys-configuration
@@ -60,6 +63,31 @@
 
 
 ;;;
+;;; 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")))
+    (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)))))))
+
+
+;;;
 ;;; Bridge for guix-daemon.
 ;;;
 
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index c32965b..12ebaca 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -145,29 +145,6 @@
 (define operating-system-etc-directory
   (@@ (gnu system) operating-system-etc-directory))
 
-(define (hurd-etc-service os)
-  "Return a <service> that builds containing the static part of the /etc
-directory."
-  (let ((net-base (with-parameters ((%current-target-system
-                                     "i586-pc-gnu"))
-                    net-base))
-        (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")))
-    (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)))))))
-
 (define (hurd-essential-services os)
   (list (service system-service-type '() ;;entries
                  )



reply via email to

[Prev in Thread] Current Thread [Next in Thread]