summaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/examples/asus-c201.tmpl1
-rw-r--r--gnu/system/examples/bare-bones.tmpl1
-rw-r--r--gnu/system/examples/beaglebone-black.tmpl1
-rw-r--r--gnu/system/examples/desktop.tmpl1
-rw-r--r--gnu/system/examples/docker-image.tmpl1
-rw-r--r--gnu/system/examples/lightweight-desktop.tmpl1
-rw-r--r--gnu/system/examples/raspberry-pi-64-nfs-root.tmpl71
-rw-r--r--gnu/system/examples/raspberry-pi-64.tmpl75
-rw-r--r--gnu/system/examples/vm-image.tmpl1
-rw-r--r--gnu/system/hurd.scm44
-rw-r--r--gnu/system/images/pine64.scm21
-rw-r--r--gnu/system/install.scm2
-rw-r--r--gnu/system/linux-container.scm28
13 files changed, 205 insertions, 43 deletions
diff --git a/gnu/system/examples/asus-c201.tmpl b/gnu/system/examples/asus-c201.tmpl
index 6b6aa706fa..019111c167 100644
--- a/gnu/system/examples/asus-c201.tmpl
+++ b/gnu/system/examples/asus-c201.tmpl
@@ -1,3 +1,4 @@
+;; -*- mode: scheme; -*-
;; This is an operating system configuration template
;; for a "bare bones" setup for an ASUS C201PA.
diff --git a/gnu/system/examples/bare-bones.tmpl b/gnu/system/examples/bare-bones.tmpl
index 687d4c1573..45b4995574 100644
--- a/gnu/system/examples/bare-bones.tmpl
+++ b/gnu/system/examples/bare-bones.tmpl
@@ -1,3 +1,4 @@
+;; -*- mode: scheme; -*-
;; This is an operating system configuration template
;; for a "bare bones" setup, with no X11 display server.
diff --git a/gnu/system/examples/beaglebone-black.tmpl b/gnu/system/examples/beaglebone-black.tmpl
index 90dab62062..40d0a76a37 100644
--- a/gnu/system/examples/beaglebone-black.tmpl
+++ b/gnu/system/examples/beaglebone-black.tmpl
@@ -1,3 +1,4 @@
+;; -*- mode: scheme; -*-
;; This is an operating system configuration template
;; for a "bare bones" setup on BeagleBone Black board.
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl
index 7055a8f92d..10d0e54fa7 100644
--- a/gnu/system/examples/desktop.tmpl
+++ b/gnu/system/examples/desktop.tmpl
@@ -1,3 +1,4 @@
+;; -*- mode: scheme; -*-
;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce where the
;; root partition is encrypted with LUKS, and a swap file.
diff --git a/gnu/system/examples/docker-image.tmpl b/gnu/system/examples/docker-image.tmpl
index bdc6afa6f0..7123917af4 100644
--- a/gnu/system/examples/docker-image.tmpl
+++ b/gnu/system/examples/docker-image.tmpl
@@ -1,3 +1,4 @@
+;; -*- mode: scheme; -*-
;; This is an operating system configuration template for a "Docker image"
;; setup, so it has barely any services at all.
diff --git a/gnu/system/examples/lightweight-desktop.tmpl b/gnu/system/examples/lightweight-desktop.tmpl
index d4330ecc8e..4cb3c38311 100644
--- a/gnu/system/examples/lightweight-desktop.tmpl
+++ b/gnu/system/examples/lightweight-desktop.tmpl
@@ -1,3 +1,4 @@
+;; -*- mode: scheme; -*-
;; This is an operating system configuration template
;; for a "desktop" setup without full-blown desktop
;; environments.
diff --git a/gnu/system/examples/raspberry-pi-64-nfs-root.tmpl b/gnu/system/examples/raspberry-pi-64-nfs-root.tmpl
new file mode 100644
index 0000000000..2203375270
--- /dev/null
+++ b/gnu/system/examples/raspberry-pi-64-nfs-root.tmpl
@@ -0,0 +1,71 @@
+;; -*- mode: scheme; -*-
+;; This is an operating-system configuration template of a
+;; 64-bit minimal system for a Raspberry Pi with an NFS root file-system.
+
+;; It neither installs firmware nor device-tree files for the Raspberry Pi.
+;; It just assumes them to be existing in boot/efi in the same way that some
+;; UEFI firmware with ACPI data is usually assumed to be existing on PCs.
+
+;; It expects the boot/efi directory to be served via TFTP and the root
+;; file-system to be served via NFS. See the grub-efi-netboot-bootloader
+;; description in the manual for more details.
+
+(use-modules (gnu)
+ (gnu artwork)
+ (gnu system nss))
+(use-service-modules admin
+ avahi
+ networking
+ ssh)
+(use-package-modules certs
+ linux
+ raspberry-pi
+ ssh)
+
+(define-public raspberry-pi-64-nfs-root
+ (operating-system
+ (host-name "raspberrypi-guix")
+ (timezone "Europe/Berlin")
+ (bootloader (bootloader-configuration
+ (bootloader grub-efi-bootloader-chain-raspi-64)
+ (targets (list "/boot/efi"))
+ (theme (grub-theme
+ (resolution '(1920 . 1080))
+ (image (file-append
+ %artwork-repository
+ "/grub/GuixSD-fully-black-16-9.svg"))))))
+ (kernel-arguments '("ip=dhcp"))
+ (kernel (customize-linux #:linux linux-libre-arm64-generic
+ #:extra-version "arm64-generic-netboot"
+ #:configs '("CONFIG_NFS_SWAP=y"
+ "CONFIG_USB_USBNET=y"
+ "CONFIG_USB_LAN78XX=y"
+ "CONFIG_USB_NET_SMSC95XX=y")))
+ (initrd-modules '())
+ (file-systems (cons* (file-system
+ (mount-point "/")
+ (type "nfs")
+ (device ":/export/raspberrypi/guix")
+ (options "addr=10.20.30.40,vers=4.1"))
+ %base-file-systems))
+ (swap-devices (list (swap-space
+ (target "/run/swapfile"))))
+ (users (cons* (user-account
+ (name "pi")
+ (group "users")
+ (supplementary-groups '("wheel" "netdev" "audio" "video"))
+ (home-directory "/home/pi"))
+ %base-user-accounts))
+ (packages (cons* nss-certs
+ openssh
+ %base-packages))
+ (services (cons* (service avahi-service-type)
+ (service dhcp-client-service-type)
+ (service ntp-service-type)
+ (service openssh-service-type
+ (openssh-configuration
+ (x11-forwarding? #t)))
+ %base-services))
+ (name-service-switch %mdns-host-lookup-nss)))
+
+raspberry-pi-64-nfs-root
diff --git a/gnu/system/examples/raspberry-pi-64.tmpl b/gnu/system/examples/raspberry-pi-64.tmpl
new file mode 100644
index 0000000000..185d25c412
--- /dev/null
+++ b/gnu/system/examples/raspberry-pi-64.tmpl
@@ -0,0 +1,75 @@
+;; -*- mode: scheme; -*-
+;; This is an operating-system configuration template of a
+;; 64-bit minimal system for a Raspberry Pi with local storage.
+
+;; It neither installs firmware nor device-tree files for the Raspberry Pi.
+;; It just assumes them to be existing in boot/efi in the same way that some
+;; UEFI firmware with ACPI data is usually assumed to be existing on PCs.
+
+;; It expects the boot-partition to be mounted as boot/efi in the same way
+;; as it is usually expeted on PCs with UEFI firmware.
+
+(use-modules (gnu)
+ (gnu artwork)
+ (gnu system nss))
+(use-service-modules admin
+ avahi
+ networking
+ ssh)
+(use-package-modules certs
+ linux
+ raspberry-pi
+ ssh)
+
+(define-public raspberry-pi-64
+ (operating-system
+ (host-name "raspberrypi-guix")
+ (timezone "Europe/Berlin")
+ (bootloader (bootloader-configuration
+ (bootloader grub-efi-bootloader-chain-raspi-64)
+ (targets (list "/boot/efi"))
+ (theme (grub-theme
+ (resolution '(1920 . 1080))
+ (image (file-append
+ %artwork-repository
+ "/grub/GuixSD-fully-black-16-9.svg"))))))
+ (kernel (customize-linux #:linux linux-libre-arm64-generic
+ ;; It is possible to use a specific defconfig
+ ;; file, for example the "bcmrpi3_defconfig" with
+ ;; the variable shown below. Unfortunately the
+ ;; kernel built from the linux-libre sources with
+ ;; this defconfig file does not boot.
+ ;;#:extra-version "gnu-bcmrpi3"
+ ;;#:defconfig %bcmrpi3-defconfig
+ ))
+ (initrd-modules '())
+ (file-systems (cons* (file-system
+ (mount-point "/")
+ (type "ext4")
+ (device (file-system-label "Guix")))
+ (file-system
+ (mount-point "/boot/efi")
+ (type "vfat")
+ (device (file-system-label "EFI")))
+ %base-file-systems))
+ (swap-devices (list (swap-space
+ (target "/run/swapfile"))))
+ (users (cons* (user-account
+ (name "pi")
+ (group "users")
+ (supplementary-groups '("wheel" "netdev" "audio" "video"))
+ (home-directory "/home/pi"))
+ %base-user-accounts))
+ (packages (cons* nss-certs
+ openssh
+ %base-packages))
+ (services (cons* (service avahi-service-type)
+ (service dhcp-client-service-type)
+ (service ntp-service-type)
+ (service openssh-service-type
+ (openssh-configuration
+ (x11-forwarding? #t)))
+ %base-services))
+ (name-service-switch %mdns-host-lookup-nss)))
+
+raspberry-pi-64
diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-image.tmpl
index d46a27978c..343287eaf6 100644
--- a/gnu/system/examples/vm-image.tmpl
+++ b/gnu/system/examples/vm-image.tmpl
@@ -1,3 +1,4 @@
+;; -*- mode: scheme; -*-
;; This is an operating system configuration for a VM image.
;; Modify it as you see fit and instantiate the changes by running:
;;
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 4bc32d9bd1..24fc6dbcae 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -75,28 +75,30 @@
info-reader))
(define %base-services/hurd
- (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 %loopback-static-networking
+ (append (list (service hurd-console-service-type
+ (hurd-console-configuration (hurd hurd)))
+ (service static-networking-service-type
+ (list %loopback-static-networking
- ;; 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))
- (syslog-service)
- (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"))))))
+ ;; 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"))))
+ (syslog-service))
+ (map (lambda (n)
+ (service hurd-getty-service-type
+ (hurd-getty-configuration
+ (tty (string-append "tty" (number->string n))))))
+ (iota 6 1))))
(define %setuid-programs/hurd
;; Default set of setuid-root programs.
diff --git a/gnu/system/images/pine64.scm b/gnu/system/images/pine64.scm
index a2d471b802..3feb69764d 100644
--- a/gnu/system/images/pine64.scm
+++ b/gnu/system/images/pine64.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2022 Gabriel Wicki <gabriel@erlikon.ch>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,9 +22,11 @@
#:use-module (gnu bootloader u-boot)
#:use-module (gnu image)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages certs)
#:use-module (guix platforms arm)
#:use-module (gnu services)
#:use-module (gnu services base)
+ #:use-module (gnu services networking)
#:use-module (gnu system)
#:use-module (gnu system file-systems)
#:use-module (gnu system image)
@@ -47,13 +50,17 @@
(mount-point "/")
(type "ext4"))
%base-file-systems))
- (services (cons (service agetty-service-type
- (agetty-configuration
- (extra-options '("-L")) ; no carrier detect
- (baud-rate "115200")
- (term "vt100")
- (tty "ttyS0")))
- %base-services))))
+ (services (cons*
+ (service agetty-service-type
+ (agetty-configuration
+ (extra-options '("-L")) ; no carrier detect
+ (baud-rate "115200")
+ (term "vt100")
+ (tty "ttyS0")))
+ (service dhcp-client-service-type)
+ (service ntp-service-type)
+ %base-services))
+ (packages (cons nss-certs %base-packages))))
(define pine64-image-type
(image-type
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 3dd9e0e87b..b3cf7a1bd8 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -476,6 +476,8 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
;; A well-rounded set of packages for interacting with disks, partitions and
;; file systems, included with the Guix installation image.
(list parted gptfdisk ddrescue
+ ;; Use the static LVM2 because it's already pulled in by the installer.
+ lvm2-static
;; We used to provide fdisk from GNU fdisk, but as of version 2.0.0a
;; it pulls Guile 1.8, which takes unreasonable space; furthermore
;; util-linux's fdisk is already available, in %base-packages-linux.
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index 69080bcacb..c2fd55d48e 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -121,9 +121,7 @@ containerized OS. EXTRA-FILE-SYSTEMS is a list of file systems to add to OS."
;; different configs that are better suited to containers.
(append (list console-font-service-type
mingetty-service-type
- agetty-service-type
- ;; Reinstantiated below with smaller caches.
- nscd-service-type)
+ agetty-service-type)
(if shared-network?
;; Replace these with dummy-networking-service-type below.
(list
@@ -134,17 +132,13 @@ containerized OS. EXTRA-FILE-SYSTEMS is a list of file systems to add to OS."
(list))))
(define services-to-add
- (append
- ;; Many Guix services depend on a 'networking' shepherd
- ;; service, so make sure to provide a dummy 'networking'
- ;; service when we are sure that networking is already set up
- ;; in the host and can be used. That prevents double setup.
- (if shared-network?
- (list (service dummy-networking-service-type))
- '())
- (list
- (nscd-service (nscd-configuration
- (caches %nscd-container-caches))))))
+ ;; Many Guix services depend on a 'networking' shepherd
+ ;; service, so make sure to provide a dummy 'networking'
+ ;; service when we are sure that networking is already set up
+ ;; in the host and can be used. That prevents double setup.
+ (if shared-network?
+ (list (service dummy-networking-service-type))
+ '()))
(operating-system
(inherit os)
@@ -155,7 +149,11 @@ containerized OS. EXTRA-FILE-SYSTEMS is a list of file systems to add to OS."
(services (append (remove (lambda (service)
(memq (service-kind service)
services-to-drop))
- (operating-system-user-services os))
+ (modify-services (operating-system-user-services os)
+ (nscd-service-type
+ config => (nscd-configuration
+ (inherit config)
+ (caches %nscd-container-caches)))))
services-to-add))
(file-systems (append (map mapping->fs
(if shared-network?