[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10/21: system: examples: Add bare-hurd.tmpl.
From: |
guix-commits |
Subject: |
10/21: system: examples: Add bare-hurd.tmpl. |
Date: |
Thu, 7 May 2020 12:31:11 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit dea6cebcc03738d6e87410ae6751465cb3f4aa64
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Mon Apr 13 17:15:10 2020 +0200
system: examples: Add bare-hurd.tmpl.
With this, you can do
./pre-inst-env guix system vm-image --target=i586-pc-gnu
gnu/system/examples/bare-hurd.tmpl
See also: <https://bugs.gnu.org/40839>; wip-disk-image.
* gnu/system/hurd.scm (%hurd-default-operating-system): New exported
variable.
* gnu/system/examples/bare-hurd.tmpl: New file.
* Makefile.am (EXAMPLES): Add it.
---
Makefile.am | 3 ++-
gnu/services.scm | 5 +++-
gnu/system/examples/bare-hurd.tmpl | 26 +++++++++++++++++++++
gnu/system/hurd.scm | 47 +++++++++++++++++++++++++++++++++++++-
4 files changed, 78 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 6cd6e79..b00660c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,7 +7,7 @@
# Copyright © 2017 Mathieu Othacehe <address@hidden>
# Copyright © 2017 Leo Famulari <address@hidden>
# Copyright © 2017 Ricardo Wurmus <address@hidden>
-# Copyright © 2017 Jan Nieuwenhuizen <address@hidden>
+# Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <address@hidden>
# Copyright © 2017 Arun Isaac <address@hidden>
# Copyright © 2018 ng0 <address@hidden>
# Copyright © 2018 Julien Lepiller <address@hidden>
@@ -344,6 +344,7 @@ AUX_FILES = \
EXAMPLES = \
gnu/system/examples/asus-c201.tmpl \
gnu/system/examples/bare-bones.tmpl \
+ gnu/system/examples/bare-hurd.tmpl \
gnu/system/examples/beaglebone-black.tmpl \
gnu/system/examples/desktop.tmpl \
gnu/system/examples/lightweight-desktop.tmpl \
diff --git a/gnu/services.scm b/gnu/services.scm
index 2e4648b..614956f 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès
<address@hidden>
;;; Copyright © 2016 Chris Marusich <address@hidden>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,10 +30,12 @@
#:use-module (guix describe)
#:use-module (guix sets)
#:use-module (guix ui)
- #:use-module ((guix utils) #:select (source-properties->location))
+ #:use-module ((guix utils) #:select (source-properties->location
+ %current-target-system))
#:use-module (guix modules)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages hurd)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-9 gnu)
diff --git a/gnu/system/examples/bare-hurd.tmpl
b/gnu/system/examples/bare-hurd.tmpl
new file mode 100644
index 0000000..74e5e03
--- /dev/null
+++ b/gnu/system/examples/bare-hurd.tmpl
@@ -0,0 +1,26 @@
+;; -*-scheme-*-
+
+;; This is an operating system configuration template
+;; for a "bare bones" setup, with no X11 display server.
+
+(use-modules (gnu) (gnu system hurd) (guix utils))
+(use-service-modules hurd ssh)
+(use-package-modules ssh)
+
+(define %hurd-os
+ (operating-system
+ (inherit %hurd-default-operating-system)
+ (bootloader (bootloader-configuration
+ (bootloader hurd-grub-minimal-bootloader)
+ (target "/dev/sdX")))
+ (file-systems (cons (file-system
+ (device (file-system-label "my-root"))
+ (mount-point "/")
+ (type "ext2"))
+ %base-file-systems))
+ (host-name "guixygnu")
+ (timezone "GNUrope")
+ (packages %base-packages/hurd)
+ (services %base-services/hurd)))
+
+%hurd-os
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index f8939c2..1cc0af1 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -32,8 +32,17 @@
#:use-module (gnu packages guile-xyz)
#:use-module (gnu packages hurd)
#:use-module (gnu packages less)
+ #:use-module (gnu services)
+ #:use-module (gnu services base)
+ #:use-module (gnu services hurd)
+ #:use-module (gnu services shepherd)
+ #:use-module (gnu system)
+ #:use-module (gnu system shadow)
#:use-module (gnu system vm)
#:export (cross-hurd-image
+ %base-packages/hurd
+ %base-services/hurd
+ %hurd-default-operating-system
hurd-grub-configuration-file
hurd-grub-minimal-bootloader))
@@ -57,7 +66,10 @@
(define %base-packages/hurd
(list hurd bash coreutils file findutils grep sed
guile-3.0 guile-colorized guile-readline
- net-base inetutils less which))
+ net-base inetutils less shepherd which))
+
+(define %base-services/hurd
+ '())
(define* (hurd-grub-configuration-file config entries
#:key
@@ -92,6 +104,39 @@ menuentry \"GNU\" {
(inherit grub-minimal-bootloader)
(configuration-file-generator hurd-grub-configuration-file)))
+(define %hurd-default-operating-system
+ (operating-system
+ (kernel gnumach)
+ ;; (kernel-loadable-modules '())
+ (kernel-arguments '())
+ (hurd hurd)
+ (bootloader (bootloader-configuration
+ (bootloader hurd-grub-minimal-bootloader)
+ (target "/dev/vda")))
+ (label (lambda _ "label"))
+ (initrd (lambda _ '()))
+ (initrd-modules (lambda _ '()))
+ (firmware '())
+ (host-name "guixygnu")
+ ;; (hosts-file #F)
+ ;; (mapped-devices '())
+ (file-systems '())
+ ;; (swap-devices '())
+ (users '())
+ ;(groups '())
+ (skeletons '())
+ ;; (issue %default-issue)
+ (packages %base-packages/hurd)
+ (timezone "GNUrope")
+ ;; (locale "en_US.utf8")
+ (locale-definitions '())
+ ;; (locale-libcs '())
+ (name-service-switch #f)
+ (essential-services (hurd-default-essential-services
this-operating-system))
+ (pam-services '())
+ (setuid-programs '())
+ (sudoers-file #f)))
+
(define* (cross-hurd-image #:key (hurd hurd) (gnumach gnumach))
"Return a cross-built GNU/Hurd image."
- branch wip-hurd-vm created (now ed48faf), guix-commits, 2020/05/07
- 01/21: syscalls: Add ioctl flags for the Hurd., guix-commits, 2020/05/07
- 02/21: gnu: glibc/hurd-headers: Cross-build fix for the Hurd., guix-commits, 2020/05/07
- 06/21: system: hurd: Add hurd-grub-configuration-file., guix-commits, 2020/05/07
- 04/21: system: vm: Add defaults for the Hurd., guix-commits, 2020/05/07
- 07/21: system: hurd: Add hurd-grub-minimal-bootloader., guix-commits, 2020/05/07
- 08/21: system: Add 'hurd' field to <operating-system>., guix-commits, 2020/05/07
- 09/21: system: vm: Initial vm-image support for the Hurd., guix-commits, 2020/05/07
- 03/21: system: vm: Fix for cross-build to the Hurd., guix-commits, 2020/05/07
- 05/21: system: hurd: Add hurd-default-essential-services., guix-commits, 2020/05/07
- 10/21: system: examples: Add bare-hurd.tmpl.,
guix-commits <=
- 16/21: services: Add `hurd-getty-service-type'., guix-commits, 2020/05/07
- 17/21: HACK services: hurd: Add dummy `loopback'., guix-commits, 2020/05/07
- 11/21: services: hurd: Add `hurd-etc-sevcice'., guix-commits, 2020/05/07
- 12/21: system: Add `hurd-activation'., guix-commits, 2020/05/07
- 13/21: services: hurd: Use activation-service, hurd-etc-service., guix-commits, 2020/05/07
- 14/21: gnu: hurd: Create minimal "runsystem" script to invoke "rc"., guix-commits, 2020/05/07
- 15/21: services: Add `hurd-console-service-type'., guix-commits, 2020/05/07
- 18/21: WIP: gnu: services: Add `%hurd-bare-metal-service'., guix-commits, 2020/05/07
- 20/21: DRAFT: system: vm: Activate the Hurd., guix-commits, 2020/05/07
- 19/21: DRAFT: system: hurd: Populate services., guix-commits, 2020/05/07