system: hurd: Oops, have 'initrd' default to #f.
[jackhill/guix/guix.git] / gnu / system / hurd.scm
CommitLineData
a9f7993e
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
3eb4b466 3;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
a9f7993e
LC
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu system hurd)
21 #:use-module (guix gexp)
c6212694 22 #:use-module (guix profiles)
a9f7993e 23 #:use-module (guix utils)
59bcffa3 24 #:use-module (gnu bootloader)
a9f7993e 25 #:use-module (gnu bootloader grub)
db047a48 26 #:use-module (gnu packages admin)
a9f7993e 27 #:use-module (gnu packages base)
fe1f9646 28 #:use-module (gnu packages bash)
a9f7993e 29 #:use-module (gnu packages cross-base)
da987ece
JN
30 #:use-module (gnu packages file)
31 #:use-module (gnu packages guile)
5084fd38 32 #:use-module (gnu packages guile-xyz)
a9f7993e 33 #:use-module (gnu packages hurd)
9b0c047c 34 #:use-module (gnu packages less)
59bcffa3
JN
35 #:use-module (gnu services)
36 #:use-module (gnu services base)
37 #:use-module (gnu services hurd)
38 #:use-module (gnu services shepherd)
39 #:use-module (gnu system)
40 #:use-module (gnu system shadow)
a9f7993e 41 #:use-module (gnu system vm)
60fdd9e3 42 #:export (%base-packages/hurd
59bcffa3
JN
43 %base-services/hurd
44 %hurd-default-operating-system
45 %hurd-default-operating-system-kernel))
a9f7993e
LC
46
47;;; Commentary:
48;;;
60fdd9e3
JN
49;;; This module provides system-specifics for the GNU/Hurd operating system
50;;; and virtual machine.
a9f7993e
LC
51;;;
52;;; Code:
53
59bcffa3
JN
54(define %hurd-default-operating-system-kernel
55 (if (hurd-system?)
56 gnumach
57 ;; A cross-built GNUmach does not work
58 (with-parameters ((%current-system "i686-linux")
59 (%current-target-system #f))
60 gnumach)))
61
da987ece 62(define %base-packages/hurd
5084fd38
LC
63 (list hurd bash coreutils file findutils grep sed
64 guile-3.0 guile-colorized guile-readline
59bcffa3
JN
65 net-base inetutils less shepherd which))
66
67(define %base-services/hurd
11e4200f
JN
68 (list (service hurd-console-service-type
69 (hurd-console-configuration (hurd hurd)))
70 (service hurd-getty-service-type (hurd-getty-configuration
71 (tty "tty1")))
72 (service hurd-getty-service-type (hurd-getty-configuration
73 (tty "tty2")))
74 (service static-networking-service-type
75 (list (static-networking (interface "lo")
76 (ip "127.0.0.1")
77 (requirement '())
78 (provision '(loopback))
79 (name-servers '("10.0.2.3")))))
80 (syslog-service)
81 (service guix-service-type
82 (guix-configuration
83 (extra-options '("--disable-chroot"
f817a0c0
JN
84 "--disable-deduplication"))))
85 (service special-files-service-type
86 `(("/bin/sh" ,(file-append bash "/bin/sh"))
87 ("/usr/bin/env" ,(file-append coreutils "/bin/env"))))))
59bcffa3
JN
88
89(define %hurd-default-operating-system
90 (operating-system
91 (kernel %hurd-default-operating-system-kernel)
92 (kernel-arguments '())
93 (hurd hurd)
94 (bootloader (bootloader-configuration
95 (bootloader grub-minimal-bootloader)
96 (target "/dev/vda")))
5164d7fd 97 (initrd #f)
59bcffa3
JN
98 (initrd-modules (lambda _ '()))
99 (firmware '())
100 (host-name "guixygnu")
101 (file-systems '())
102 (packages %base-packages/hurd)
103 (timezone "GNUrope")
104 (name-service-switch #f)
105 (essential-services (hurd-default-essential-services this-operating-system))
106 (pam-services '())
107 (setuid-programs '())
108 (sudoers-file #f)))