| 1 | ;; -*- mode: scheme; -*-
|
| 2 | ;; This is an operating-system configuration template of a
|
| 3 | ;; 64-bit minimal system for a Raspberry Pi with local storage.
|
| 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-partition to be mounted as boot/efi in the same way
|
| 10 | ;; as it is usually expected on PCs with UEFI firmware.
|
| 11 |
|
| 12 | (use-modules (gnu)
|
| 13 | (gnu artwork)
|
| 14 | (gnu system nss))
|
| 15 | (use-service-modules admin
|
| 16 | avahi
|
| 17 | networking
|
| 18 | ssh)
|
| 19 | (use-package-modules linux
|
| 20 | raspberry-pi
|
| 21 | ssh)
|
| 22 |
|
| 23 | (define-public raspberry-pi-64
|
| 24 | (operating-system
|
| 25 | (host-name "raspberrypi-guix")
|
| 26 | (timezone "Europe/Berlin")
|
| 27 | (bootloader (bootloader-configuration
|
| 28 | (bootloader grub-efi-bootloader-chain-raspi-64)
|
| 29 | (targets (list "/boot/efi"))
|
| 30 | (theme (grub-theme
|
| 31 | (resolution '(1920 . 1080))
|
| 32 | (image (file-append
|
| 33 | %artwork-repository
|
| 34 | "/grub/GuixSD-fully-black-16-9.svg"))))))
|
| 35 | (kernel (customize-linux #:linux linux-libre-arm64-generic
|
| 36 | ;; It is possible to use a specific defconfig
|
| 37 | ;; file, for example the "bcmrpi3_defconfig" with
|
| 38 | ;; the variable shown below. Unfortunately the
|
| 39 | ;; kernel built from the linux-libre sources with
|
| 40 | ;; this defconfig file does not boot.
|
| 41 | ;;#:extra-version "gnu-bcmrpi3"
|
| 42 | ;;#:defconfig %bcmrpi3-defconfig
|
| 43 | ))
|
| 44 | (initrd-modules '())
|
| 45 | (file-systems (cons* (file-system
|
| 46 | (mount-point "/")
|
| 47 | (type "ext4")
|
| 48 | (device (file-system-label "Guix")))
|
| 49 | (file-system
|
| 50 | (mount-point "/boot/efi")
|
| 51 | (type "vfat")
|
| 52 | (device (file-system-label "EFI")))
|
| 53 | %base-file-systems))
|
| 54 | (swap-devices (list (swap-space
|
| 55 | (target "/run/swapfile"))))
|
| 56 | (users (cons* (user-account
|
| 57 | (name "pi")
|
| 58 | (group "users")
|
| 59 | (supplementary-groups '("wheel" "netdev" "audio" "video"))
|
| 60 | (home-directory "/home/pi"))
|
| 61 | %base-user-accounts))
|
| 62 | (packages (cons* openssh
|
| 63 | %base-packages))
|
| 64 | (services (cons* (service avahi-service-type)
|
| 65 | (service dhcpcd-service-type)
|
| 66 | (service ntp-service-type)
|
| 67 | (service openssh-service-type
|
| 68 | (openssh-configuration
|
| 69 | (x11-forwarding? #t)))
|
| 70 | %base-services))
|
| 71 | (name-service-switch %mdns-host-lookup-nss)))
|
| 72 |
|
| 73 | raspberry-pi-64
|