2020-04-01 14:18:23 +00:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2021-08-12 10:28:26 +00:00
|
|
|
;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
2020-04-08 07:46:40 +00:00
|
|
|
;;; Copyright © 2020 Jan (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
|
|
|
|
(if (hurd-system?)
|
|
|
|
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
|
2020-04-08 21:10:14 +00:00
|
|
|
(list hurd 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
|
2021-10-17 21:46:49 +00:00
|
|
|
net-base inetutils less shadow shepherd sudo which
|
|
|
|
info-reader))
|
2020-04-13 15:15:10 +00:00
|
|
|
|
|
|
|
(define %base-services/hurd
|
2020-05-06 08:07:08 +00:00
|
|
|
(list (service hurd-console-service-type
|
|
|
|
(hurd-console-configuration (hurd hurd)))
|
|
|
|
(service hurd-getty-service-type (hurd-getty-configuration
|
|
|
|
(tty "tty1")))
|
|
|
|
(service hurd-getty-service-type (hurd-getty-configuration
|
|
|
|
(tty "tty2")))
|
|
|
|
(service static-networking-service-type
|
2021-10-27 10:26:31 +00:00
|
|
|
(list %loopback-static-networking
|
2021-10-27 10:20:49 +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))
|
2020-05-06 08:07:08 +00:00
|
|
|
(syslog-service)
|
|
|
|
(service guix-service-type
|
|
|
|
(guix-configuration
|
|
|
|
(extra-options '("--disable-chroot"
|
2020-06-18 07:32:45 +00:00
|
|
|
"--disable-deduplication"))))
|
|
|
|
(service special-files-service-type
|
|
|
|
`(("/bin/sh" ,(file-append bash "/bin/sh"))
|
|
|
|
("/usr/bin/env" ,(file-append coreutils "/bin/env"))))))
|
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)
|
2020-04-13 15:15:10 +00:00
|
|
|
(initrd-modules (lambda _ '()))
|
|
|
|
(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)))
|