raspberry-pi-64-nfs-root.tmpl 3.0 KB

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