scripts: system: Accept <image> records as input.
[jackhill/guix/guix.git] / gnu / system / images / novena.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
3 ;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
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 novena)
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 services)
26 #:use-module (gnu services base)
27 #:use-module (gnu system)
28 #:use-module (gnu system file-systems)
29 #:use-module (gnu system image)
30 #:use-module (srfi srfi-26)
31 #:export (novena-barebones-os
32 novena-image-type
33 novena-barebones-raw-image))
34
35 (define novena-barebones-os
36 (operating-system
37 (host-name "vignemale")
38 (timezone "Europe/Paris")
39 (locale "en_US.utf8")
40 (bootloader (bootloader-configuration
41 (bootloader u-boot-novena-bootloader)
42 (target "/dev/vda")))
43 (initrd-modules '("sdhci-esdhc-imx" "ahci_imx" "i2c-dev"))
44 ;(kernel linux-libre-arm-generic)
45 (kernel-arguments '("console=ttymxc1,115200"))
46 (file-systems (cons (file-system
47 (device (file-system-label "my-root"))
48 (mount-point "/")
49 (type "ext4"))
50 %base-file-systems))))
51
52 (define novena-image-type
53 (image-type
54 (name 'novena-raw)
55 (constructor (cut image-with-os (arm32-disk-image) <>))))
56
57 (define novena-barebones-raw-image
58 (image
59 (inherit
60 (os->image novena-barebones-os #:type novena-image-type))
61 (name 'novena-barebones-raw-image)))
62
63 ;; Return the default image.
64 novena-barebones-raw-image