[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11/16: system: examples: Add bare-hurd.tmpl.
From: |
guix-commits |
Subject: |
11/16: system: examples: Add bare-hurd.tmpl. |
Date: |
Tue, 5 May 2020 13:14:17 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit f4ff2b7fa05b74f176ec3851206da39fae12046c
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 bb243fe..65edc47 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>
@@ -343,6 +343,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 536cca3..c5ead76 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
@@ -97,6 +109,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."
- 01/16: gnu: glibc/hurd-headers: Cross-build fix for the Hurd., (continued)
- 01/16: gnu: glibc/hurd-headers: Cross-build fix for the Hurd., guix-commits, 2020/05/05
- 02/16: system: vm: Fix for cross-build to the Hurd., guix-commits, 2020/05/05
- 03/16: gnu: guix: Update to 52ce01b974., guix-commits, 2020/05/05
- 04/16: syscalls: Cross-build fix for alignof*, sizeof*., guix-commits, 2020/05/05
- 06/16: system: hurd: Add hurd-default-essential-services., guix-commits, 2020/05/05
- 07/16: system: hurd: Add hurd-grub-configuration-file., guix-commits, 2020/05/05
- 05/16: system: vm: Add defaults for the Hurd., guix-commits, 2020/05/05
- 09/16: system: Add 'hurd' field to <operating-system>., guix-commits, 2020/05/05
- 12/16: services: hurd: Add hurd-etc-sevcices., guix-commits, 2020/05/05
- 08/16: system: hurd: Add hurd-grub-minimal-bootloader., guix-commits, 2020/05/05
- 11/16: system: examples: Add bare-hurd.tmpl.,
guix-commits <=
- 16/16: HACK: hurd-etc-service: apply target force, guix-commits, 2020/05/05
- 13/16: system: Add hurd activation., guix-commits, 2020/05/05
- 14/16: DRAFT services: hurd: Use activation-service, hurd-etc-service., guix-commits, 2020/05/05
- 10/16: system: vm: Initial vm-image support for the Hurd., guix-commits, 2020/05/05
- 15/16: HACK hurd-etc-service: add with-parameters *ugh*, guix-commits, 2020/05/05