| 1 | ;; -*- mode: scheme; -*-
|
| 2 | ;; This is an operating-system configuration template of a
|
| 3 | ;; 64-bit minimal system for a Raspberry Pi with an NFS root file-system.
|
| 4 |
|
| 5 | ;; It neither installs firmware nor device-tree files for the Raspberry Pi.
|
| 6 | ;; It just assumes them to be existing in boot/efi in the same way that some
|
| 7 | ;; UEFI firmware with ACPI data is usually assumed to be existing on PCs.
|
| 8 |
|
| 9 | ;; It expects the boot/efi directory to be served via TFTP and the root
|
| 10 | ;; file-system to be served via NFS. See the grub-efi-netboot-bootloader
|
| 11 | ;; description in the manual for more details.
|
| 12 |
|
| 13 | (use-modules (gnu)
|
| 14 | (gnu artwork)
|
| 15 | (gnu system nss))
|
| 16 | (use-service-modules admin
|
| 17 | avahi
|
| 18 | networking
|
| 19 | ssh)
|
| 20 | (use-package-modules linux
|
| 21 | raspberry-pi
|
| 22 | ssh)
|
| 23 |
|
| 24 | (define-public raspberry-pi-64-nfs-root
|
| 25 | (operating-system
|
| 26 | (host-name "raspberrypi-guix")
|
| 27 | (timezone "Europe/Berlin")
|
| 28 | (bootloader (bootloader-configuration
|
| 29 | (bootloader grub-efi-bootloader-chain-raspi-64)
|
| 30 | (targets (list "/boot/efi"))
|
| 31 | (theme (grub-theme
|
| 32 | (resolution '(1920 . 1080))
|
| 33 | (image (file-append
|
| 34 | %artwork-repository
|
| 35 | "/grub/GuixSD-fully-black-16-9.svg"))))))
|
| 36 | (kernel-arguments '("ip=dhcp"))
|
| 37 | (kernel (customize-linux #:linux linux-libre-arm64-generic
|
| 38 | #:extra-version "arm64-generic-netboot"
|
| 39 | #:configs '("CONFIG_NFS_SWAP=y"
|
| 40 | "CONFIG_USB_USBNET=y"
|
| 41 | "CONFIG_USB_LAN78XX=y"
|
| 42 | "CONFIG_USB_NET_SMSC95XX=y")))
|
| 43 | (initrd-modules '())
|
| 44 | (file-systems (cons* (file-system
|
| 45 | (mount-point "/")
|
| 46 | (type "nfs")
|
| 47 | (device ":/export/raspberrypi/guix")
|
| 48 | (options "addr=10.20.30.40,vers=4.1"))
|
| 49 | %base-file-systems))
|
| 50 | (swap-devices (list (swap-space
|
| 51 | (target "/run/swapfile"))))
|
| 52 | (users (cons* (user-account
|
| 53 | (name "pi")
|
| 54 | (group "users")
|
| 55 | (supplementary-groups '("wheel" "netdev" "audio" "video"))
|
| 56 | (home-directory "/home/pi"))
|
| 57 | %base-user-accounts))
|
| 58 | (packages (cons* openssh
|
| 59 | %base-packages))
|
| 60 | (services (cons* (service avahi-service-type)
|
| 61 | (service dhcpcd-service-type)
|
| 62 | (service ntp-service-type)
|
| 63 | (service openssh-service-type
|
| 64 | (openssh-configuration
|
| 65 | (x11-forwarding? #t)))
|
| 66 | %base-services))
|
| 67 | (name-service-switch %mdns-host-lookup-nss)))
|
| 68 |
|
| 69 | raspberry-pi-64-nfs-root
|