2020-04-01 14:18:23 +00:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2022-03-09 21:57:08 +00:00
|
|
|
;;; Copyright © 2020-2022 Ludovic Courtès <ludo@gnu.org>
|
2023-05-24 21:27:25 +00:00
|
|
|
;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
|
2020-04-01 14:18:23 +00:00
|
|
|
;;;
|
|
|
|
;;; 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 <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
(define-module (gnu system hurd)
|
|
|
|
#:use-module (guix gexp)
|
2020-04-08 14:36:08 +00:00
|
|
|
#:use-module (guix profiles)
|
2020-04-01 14:18:23 +00:00
|
|
|
#:use-module (guix utils)
|
2020-04-13 15:15:10 +00:00
|
|
|
#:use-module (gnu bootloader)
|
2020-04-01 14:18:23 +00:00
|
|
|
#:use-module (gnu bootloader grub)
|
2020-04-08 15:39:30 +00:00
|
|
|
#:use-module (gnu packages admin)
|
2020-04-01 14:18:23 +00:00
|
|
|
#:use-module (gnu packages base)
|
2020-04-05 15:16:30 +00:00
|
|
|
#:use-module (gnu packages bash)
|
system: hurd: Add diffutils, patch, gawk, tar, gzip, bzip2, xz, and lzip.
* gnu/system/hurd.scm (%base-packages/hurd): Add diffutils, patch, gawk, tar, gzip,
bzip2, xz, and lzip.
2020-10-09 21:12:43 +00:00
|
|
|
#:use-module (gnu packages compression)
|
2020-04-01 14:18:23 +00:00
|
|
|
#:use-module (gnu packages cross-base)
|
2020-04-08 06:04:52 +00:00
|
|
|
#:use-module (gnu packages file)
|
system: hurd: Add diffutils, patch, gawk, tar, gzip, bzip2, xz, and lzip.
* gnu/system/hurd.scm (%base-packages/hurd): Add diffutils, patch, gawk, tar, gzip,
bzip2, xz, and lzip.
2020-10-09 21:12:43 +00:00
|
|
|
#:use-module (gnu packages gawk)
|
2020-04-08 06:04:52 +00:00
|
|
|
#:use-module (gnu packages guile)
|
2020-04-08 21:10:14 +00:00
|
|
|
#:use-module (gnu packages guile-xyz)
|
2020-04-01 14:18:23 +00:00
|
|
|
#:use-module (gnu packages hurd)
|
2020-04-14 08:16:21 +00:00
|
|
|
#:use-module (gnu packages less)
|
2021-10-17 21:46:49 +00:00
|
|
|
#:use-module (gnu packages texinfo)
|
2020-04-13 15:15:10 +00:00
|
|
|
#:use-module (gnu services)
|
|
|
|
#:use-module (gnu services base)
|
|
|
|
#:use-module (gnu services hurd)
|
|
|
|
#:use-module (gnu services shepherd)
|
|
|
|
#:use-module (gnu system)
|
2021-08-12 10:28:26 +00:00
|
|
|
#:use-module (gnu system setuid)
|
2020-04-13 15:15:10 +00:00
|
|
|
#:use-module (gnu system shadow)
|
2020-04-01 14:18:23 +00:00
|
|
|
#:use-module (gnu system vm)
|
2020-05-27 07:13:19 +00:00
|
|
|
#:export (%base-packages/hurd
|
2020-04-13 15:15:10 +00:00
|
|
|
%base-services/hurd
|
|
|
|
%hurd-default-operating-system
|
2020-10-09 20:55:46 +00:00
|
|
|
%hurd-default-operating-system-kernel
|
|
|
|
%setuid-programs/hurd))
|
2020-04-01 14:18:23 +00:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;;;
|
2020-05-27 07:13:19 +00:00
|
|
|
;;; This module provides system-specifics for the GNU/Hurd operating system
|
|
|
|
;;; and virtual machine.
|
2020-04-01 14:18:23 +00:00
|
|
|
;;;
|
|
|
|
;;; Code:
|
|
|
|
|
2020-04-13 15:15:10 +00:00
|
|
|
(define %hurd-default-operating-system-kernel
|
2023-06-17 11:51:05 +00:00
|
|
|
(if (system-hurd?)
|
2020-04-13 15:15:10 +00:00
|
|
|
gnumach
|
|
|
|
;; A cross-built GNUmach does not work
|
|
|
|
(with-parameters ((%current-system "i686-linux")
|
|
|
|
(%current-target-system #f))
|
|
|
|
gnumach)))
|
|
|
|
|
2020-04-08 06:04:52 +00:00
|
|
|
(define %base-packages/hurd
|
2022-03-09 21:57:08 +00:00
|
|
|
;; Note: the Shepherd comes before the Hurd, not just because its duty is to
|
|
|
|
;; shepherd the herd, but also because we want its 'halt' and 'reboot'
|
|
|
|
;; commands to take precedence.
|
2023-05-24 21:27:25 +00:00
|
|
|
(list shepherd-0.8 hurd netdde bash coreutils file findutils grep sed
|
system: hurd: Add diffutils, patch, gawk, tar, gzip, bzip2, xz, and lzip.
* gnu/system/hurd.scm (%base-packages/hurd): Add diffutils, patch, gawk, tar, gzip,
bzip2, xz, and lzip.
2020-10-09 21:12:43 +00:00
|
|
|
diffutils patch gawk tar gzip bzip2 xz lzip
|
2020-10-09 21:02:52 +00:00
|
|
|
guile-3.0-latest guile-colorized guile-readline
|
2022-03-09 21:57:08 +00:00
|
|
|
net-base inetutils less shadow sudo which
|
2021-10-17 21:46:49 +00:00
|
|
|
info-reader))
|
2020-04-13 15:15:10 +00:00
|
|
|
|
|
|
|
(define %base-services/hurd
|
2022-11-28 10:18:15 +00:00
|
|
|
(append (list (service hurd-console-service-type
|
|
|
|
(hurd-console-configuration (hurd hurd)))
|
|
|
|
(service static-networking-service-type
|
|
|
|
(list %loopback-static-networking
|
2021-10-27 10:20:49 +00:00
|
|
|
|
2022-11-28 10:18:15 +00:00
|
|
|
;; QEMU user-mode networking. To get "eth0", you need
|
|
|
|
;; QEMU to emulate a device for which Mach has an
|
|
|
|
;; in-kernel driver, for instance with:
|
|
|
|
;; --device rtl8139,netdev=net0 --netdev user,id=net0
|
|
|
|
%qemu-static-networking))
|
|
|
|
(service guix-service-type
|
|
|
|
(guix-configuration
|
|
|
|
(extra-options '("--disable-chroot"
|
|
|
|
"--disable-deduplication"))))
|
|
|
|
(service special-files-service-type
|
|
|
|
`(("/bin/sh" ,(file-append bash "/bin/sh"))
|
|
|
|
("/usr/bin/env" ,(file-append coreutils
|
|
|
|
"/bin/env"))))
|
2023-02-25 18:57:53 +00:00
|
|
|
(service syslog-service-type))
|
2022-11-28 10:18:15 +00:00
|
|
|
(map (lambda (n)
|
|
|
|
(service hurd-getty-service-type
|
|
|
|
(hurd-getty-configuration
|
|
|
|
(tty (string-append "tty" (number->string n))))))
|
|
|
|
(iota 6 1))))
|
2020-04-13 15:15:10 +00:00
|
|
|
|
2020-10-09 20:55:46 +00:00
|
|
|
(define %setuid-programs/hurd
|
|
|
|
;; Default set of setuid-root programs.
|
2021-08-12 10:28:26 +00:00
|
|
|
(map file-like->setuid-program
|
|
|
|
(list (file-append shadow "/bin/passwd")
|
|
|
|
(file-append shadow "/bin/sg")
|
|
|
|
(file-append shadow "/bin/su")
|
|
|
|
(file-append shadow "/bin/newgrp")
|
|
|
|
(file-append shadow "/bin/newuidmap")
|
|
|
|
(file-append shadow "/bin/newgidmap")
|
|
|
|
(file-append sudo "/bin/sudo")
|
|
|
|
(file-append sudo "/bin/sudoedit"))))
|
2020-10-09 20:55:46 +00:00
|
|
|
|
2020-04-13 15:15:10 +00:00
|
|
|
(define %hurd-default-operating-system
|
|
|
|
(operating-system
|
|
|
|
(kernel %hurd-default-operating-system-kernel)
|
|
|
|
(kernel-arguments '())
|
|
|
|
(hurd hurd)
|
|
|
|
(bootloader (bootloader-configuration
|
|
|
|
(bootloader grub-minimal-bootloader)
|
2021-08-07 19:07:47 +00:00
|
|
|
(targets '("/dev/vda"))))
|
2020-06-30 16:16:10 +00:00
|
|
|
(initrd #f)
|
2022-04-07 19:57:22 +00:00
|
|
|
(initrd-modules '())
|
2020-04-13 15:15:10 +00:00
|
|
|
(firmware '())
|
|
|
|
(host-name "guixygnu")
|
|
|
|
(file-systems '())
|
|
|
|
(packages %base-packages/hurd)
|
|
|
|
(timezone "GNUrope")
|
|
|
|
(name-service-switch #f)
|
|
|
|
(essential-services (hurd-default-essential-services this-operating-system))
|
2020-10-09 20:55:46 +00:00
|
|
|
(setuid-programs %setuid-programs/hurd)))
|