On Thu, Feb 11, 2021 at 07:24:36PM -0600, Jonathan Marsden wrote:
> 
> Is anyone currently booting Guix System on a small single board computer that 
> they can share info about, and ideally share a sample Guix system OS .scm 
> file 
> definition for?
> 

Here's a link to my pine64 config. Some config options I've factored out
into other files in the repository, but I've included a stripped-down
version attached to this email. It will build no-problems from an
aarch64 machine, but will need to have some services removed to
cross-compile from x86_64.

-- 
Efraim Flashner   <[email protected]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
(define-module (pine64))
(use-modules (guix packages)
             (gnu)
             (gnu bootloader u-boot)
             (gnu system locale)
             (srfi srfi-1))
(use-service-modules
  linux
  networking
  ssh)
(use-package-modules
  certs
  connman
  linux)

(operating-system
  (host-name "pine64")
  (timezone "Asia/Jerusalem")
  (locale "en_US.UTF-8")
  (locale-definitions
    (list (locale-definition (source "en_US")
                             (name "en_US.UTF-8"))
          (locale-definition (source "he_IL")
                             (name "he_IL.UTF-8"))))

  (bootloader (bootloader-configuration
                (bootloader u-boot-pine64-plus-bootloader)
                (target "/dev/mmcblk0")))   ; SD card/eMMC (SD priority) storage

  (initrd-modules '())
  ;; The board fails to boot with stock linux-libre
  (kernel linux-libre-arm64-generic)

  (swap-devices (list "/swapfile"))

  (file-systems (cons* (file-system
                         (device (file-system-label "root"))
                         (mount-point "/")
                         (type "ext4"))
                       %base-file-systems))

  (users (cons (user-account
                (name "efraim")
                (comment "Efraim")
                (group "users")
                (supplementary-groups '("wheel"
                                        "netdev" "kvm"))
                (home-directory "/home/efraim"))
               %base-user-accounts))

  ;; This is where we specify system-wide packages.
  (packages (cons* nss-certs         ;for HTTPS access
                   %base-packages))

  (services (cons* (service guix-publish-service-type
                            (guix-publish-configuration
                              (host "0.0.0.0")
                              (port 3000)))

                   (service openssh-service-type
                            (openssh-configuration
                              (x11-forwarding? #t)
                              (extra-content "StreamLocalBindUnlink yes")))

                   (service tor-service-type)
                   (tor-hidden-service "ssh"
                                       '((22 "127.0.0.1:22")))
                   (tor-hidden-service "guix-publish"
                                       '((3000 "127.0.0.1:3000")))

                   (service openntpd-service-type
                            (openntpd-configuration
                              (listen-on '("127.0.0.1" "::1"))
                              ;; Prevent moving to year 2116.
                              (constraints-from '("https://www.google.com/";))))

                   (service connman-service-type)
                   (service wpa-supplicant-service-type)

                   ;; Needs no-manual version, depends on pandoc.
                   (service earlyoom-service-type
                            (earlyoom-configuration
                              (earlyoom
                                (let ((base earlyoom))
                                  (package
                                    (inherit base)
                                    (native-inputs
                                      (alist-delete "pandoc"
                                                    (package-native-inputs 
base))))))))

                   ;; Not supported by linux-libre-arm64-generic
                   ;(service zram-device-service-type
                   ;         (zram-device-configuration
                   ;           (size (* 2 (expt 2 30)))
                   ;           (compression-algorithm 'zstd)
                   ;           (priority 100)))

                   %base-services))

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))

Attachment: signature.asc
Description: PGP signature

Reply via email to