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)
|
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
|
2020-10-09 20:55:46 +00:00
|
|
|
net-base inetutils less shadow shepherd sudo which))
|
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
|
|
|
|
(list (static-networking (interface "lo")
|
|
|
|
(ip "127.0.0.1")
|
|
|
|
(requirement '())
|
2021-02-14 10:55:31 +00:00
|
|
|
(provision '(loopback networking))
|
2020-05-06 08:07:08 +00:00
|
|
|
(name-servers '("10.0.2.3")))))
|
|
|
|
(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)))
|