projects/guix·blob python-team · refs

82 lines · 3.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2020 Mathieu Othacehe <[email protected]>
3;;; Copyright © 2022 Gabriel Wicki <[email protected]>
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu system images pine64)
21 #:use-module (gnu bootloader)
22 #:use-module (gnu bootloader u-boot)
23 #:use-module (gnu image)
24 #:use-module (gnu packages linux)
25 #:use-module (gnu packages nss)
26 #:use-module (guix platforms arm)
27 #:use-module (gnu services)
28 #:use-module (gnu services base)
29 #:use-module (gnu services networking)
30 #:use-module (gnu system)
31 #:use-module (gnu system file-systems)
32 #:use-module (gnu system image)
33 #:use-module (srfi srfi-26)
34 #:export (pine64-barebones-os
35 pine64-image-type
36 pine64-barebones-raw-image))
37
38(define pine64-barebones-os
39 (operating-system
40 (host-name "vignemale")
41 (timezone "Europe/Paris")
42 (locale "en_US.utf8")
43 (bootloader (bootloader-configuration
44 (bootloader u-boot-pine64-lts-bootloader)
45 (targets '("/dev/vda"))))
46 (initrd-modules '())
47 (kernel linux-libre-arm64-generic)
48 (file-systems (cons (file-system
49 (device (file-system-label "my-root"))
50 (mount-point "/")
51 (type "ext4"))
52 %base-file-systems))
53 (services (cons*
54 (service agetty-service-type
55 (agetty-configuration
56 (extra-options '("-L")) ; no carrier detect
57 (baud-rate "115200")
58 (term "vt100")
59 (tty "ttyS0")))
60 (service dhcpcd-service-type)
61 (service ntp-service-type)
62 %base-services))))
63
64(define pine64-image-type
65 (image-type
66 (name 'pine64-raw)
67 (constructor (lambda (os)
68 (image
69 (inherit (raw-with-offset-disk-image))
70 (name 'pine64-disk-image)
71 (operating-system os)
72 (platform aarch64-linux))))))
73
74(define pine64-barebones-raw-image
75 (image
76 (inherit
77 (os+platform->image pine64-barebones-os aarch64-linux
78 #:type pine64-image-type))
79 (name 'pine64-barebones-raw-image)))
80
81;; Return the default image.
82pine64-barebones-raw-image