;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (nongnu system images quartz64a) #:use-module (gnu bootloader) #:use-module (gnu bootloader u-boot) #:use-module (gnu image) #:use-module (nongnu packages linux) #:use-module (nongnu packages bootloaders) #:use-module (guix platforms arm) #:use-module (gnu packages certs) #:use-module (gnu packages ssh) #:use-module (gnu services) #:use-module (gnu services avahi) #:use-module (gnu services base) #:use-module (gnu services desktop) #:use-module (gnu services networking) #:use-module (gnu services ssh) #:use-module (gnu system) #:use-module (gnu system accounts) #:use-module (gnu system file-systems) #:use-module (gnu system image) #:use-module (gnu system nss) #:use-module (gnu system shadow) #:use-module (srfi srfi-26) #:export (quartz64-a-raw-image quartz64-image-type quartz64-barebones-raw-image)) (define quartz64-a-barebone-os (operating-system (host-name "viso") (timezone "Europe/Prague") (locale "en_US.utf8") (bootloader (bootloader-configuration (bootloader u-boot-quartz64a-rk3566-bootloader) (targets '("/dev/vda")))) (initrd-modules '()) (kernel linux-quartz64) (file-systems (append (list (file-system (device (file-system-label "root")) (mount-point "/") (type "ext4"))) %base-file-systems)) (swap-devices (list (swap-space (target "/run/swapfile")))) (users (cons* (user-account (name "pine") (group "users") (supplementary-groups '("wheel" "netdev" "audio" "video")) (password (crypt "quartz64" "$6$abc")) (home-directory "/home/pine")) %base-user-accounts)) (services (append (list (service agetty-service-type (agetty-configuration (extra-options '("-L")) ; no carrier detect (baud-rate "1500000") (term "vt100") (tty "ttyS2"))) (service avahi-service-type) (service dhcp-client-service-type) (service ntp-service-type) (service openssh-service-type)) %base-services)) (packages (cons* nss-certs openssh %base-packages)) (name-service-switch %mdns-host-lookup-nss))) (define quartz64-image-type (image-type (name 'quartz-raw) (constructor (lambda (os) (image (inherit (raw-with-offset-disk-image (* 32 (expt 2 20)))) ; 32MiB (operating-system os) (platform aarch64-linux)))))) (define quartz64-barebones-raw-image (image (inherit (os+platform->image quartz64-a-barebone-os aarch64-linux #:type quartz64-image-type)) (name 'quartz-barebones-raw-image))) ;; Return the default image. quartz64-barebones-raw-image