2020-04-01 10:18:23 -04:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2021-08-12 06:28:26 -04:00
|
|
|
;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
2020-04-08 03:46:40 -04:00
|
|
|
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
2020-04-01 10:18:23 -04: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 10:36:08 -04:00
|
|
|
#:use-module (guix profiles)
|
2020-04-01 10:18:23 -04:00
|
|
|
#:use-module (guix utils)
|
2020-04-13 11:15:10 -04:00
|
|
|
#:use-module (gnu bootloader)
|
2020-04-01 10:18:23 -04:00
|
|
|
#:use-module (gnu bootloader grub)
|
2020-04-08 11:39:30 -04:00
|
|
|
#:use-module (gnu packages admin)
|
2020-04-01 10:18:23 -04:00
|
|
|
#:use-module (gnu packages base)
|
2020-04-05 11:16:30 -04: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 17:12:43 -04:00
|
|
|
#:use-module (gnu packages compression)
|
2020-04-01 10:18:23 -04:00
|
|
|
#:use-module (gnu packages cross-base)
|
2020-04-08 02:04:52 -04: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 17:12:43 -04:00
|
|
|
#:use-module (gnu packages gawk)
|
2020-04-08 02:04:52 -04:00
|
|
|
#:use-module (gnu packages guile)
|
2020-04-08 17:10:14 -04:00
|
|
|
#:use-module (gnu packages guile-xyz)
|
2020-04-01 10:18:23 -04:00
|
|
|
#:use-module (gnu packages hurd)
|
2020-04-14 04:16:21 -04:00
|
|
|
#:use-module (gnu packages less)
|
2021-10-17 17:46:49 -04:00
|
|
|
#:use-module (gnu packages texinfo)
|
2020-04-13 11:15:10 -04: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 06:28:26 -04:00
|
|
|
#:use-module (gnu system setuid)
|
2020-04-13 11:15:10 -04:00
|
|
|
#:use-module (gnu system shadow)
|
2020-04-01 10:18:23 -04:00
|
|
|
#:use-module (gnu system vm)
|
2020-05-27 03:13:19 -04:00
|
|
|
#:export (%base-packages/hurd
|
2020-04-13 11:15:10 -04:00
|
|
|
%base-services/hurd
|
|
|
|
%hurd-default-operating-system
|
2020-10-09 16:55:46 -04:00
|
|
|
%hurd-default-operating-system-kernel
|
|
|
|
%setuid-programs/hurd))
|
2020-04-01 10:18:23 -04:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;;;
|
2020-05-27 03:13:19 -04:00
|
|
|
;;; This module provides system-specifics for the GNU/Hurd operating system
|
|
|
|
;;; and virtual machine.
|
2020-04-01 10:18:23 -04:00
|
|
|
;;;
|
|
|
|
;;; Code:
|
|
|
|
|
2020-04-13 11:15:10 -04: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 02:04:52 -04:00
|
|
|
(define %base-packages/hurd
|
2020-04-08 17:10:14 -04: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 17:12:43 -04:00
|
|
|
diffutils patch gawk tar gzip bzip2 xz lzip
|
2020-10-09 17:02:52 -04:00
|
|
|
guile-3.0-latest guile-colorized guile-readline
|
2021-10-17 17:46:49 -04:00
|
|
|
net-base inetutils less shadow shepherd sudo which
|
|
|
|
info-reader))
|
2020-04-13 11:15:10 -04:00
|
|
|
|
|
|
|
(define %base-services/hurd
|
2020-05-06 04:07:08 -04: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 06:26:31 -04:00
|
|
|
(list %loopback-static-networking
|
2021-10-27 06:20:49 -04: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 04:07:08 -04:00
|
|
|
(syslog-service)
|
|
|
|
(service guix-service-type
|
|
|
|
(guix-configuration
|
|
|
|
(extra-options '("--disable-chroot"
|
2020-06-18 03:32:45 -04: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 11:15:10 -04:00
|
|
|
|
2020-10-09 16:55:46 -04:00
|
|
|
(define %setuid-programs/hurd
|
|
|
|
;; Default set of setuid-root programs.
|
2021-08-12 06:28:26 -04: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 16:55:46 -04:00
|
|
|
|
2020-04-13 11:15:10 -04: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 15:07:47 -04:00
|
|
|
(targets '("/dev/vda"))))
|
2020-06-30 12:16:10 -04:00
|
|
|
(initrd #f)
|
2020-04-13 11:15:10 -04: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 16:55:46 -04:00
|
|
|
(setuid-programs %setuid-programs/hurd)))
|