me
/
guix
Archived
1
0
Fork 0

gnu: Replace all cons* with beginner-friendly (append (list ...)).

* gnu/system/examples/bare-bones.tmpl (services): Do it.
* gnu/system/examples/beaglebone.tmpl (packages): Do it.
(services): Do it.
* gnu/system/examples/desktop.tmpl (packages): Do it.
(services): Do it.
* gnu/system/examples/lightweight-desktop.tmpl (file-systems): Do it.
(packages): Do it.
* gnu/system/examples/vm-image.tmpl (packages): Do it.
master
Pierre Neidhardt 2019-01-21 19:37:59 +01:00
parent ece2fd1218
commit 907dd32720
No known key found for this signature in database
GPG Key ID: 9BDCF497A4BBCC7F
5 changed files with 42 additions and 33 deletions

View File

@ -44,8 +44,8 @@
;; Add services to the baseline: a DHCP client and ;; Add services to the baseline: a DHCP client and
;; an SSH server. ;; an SSH server.
(services (cons* (service dhcp-client-service-type) (services (append (list (service dhcp-client-service-type)
(service openssh-service-type (service openssh-service-type
(openssh-configuration (openssh-configuration
(port-number 2222))) (port-number 2222))))
%base-services))) %base-services)))

View File

@ -43,15 +43,15 @@
%base-user-accounts)) %base-user-accounts))
;; Globally-installed packages. ;; Globally-installed packages.
(packages (cons* screen openssh %base-packages)) (packages (append (list screen openssh) %base-packages))
(services (cons* (service dhcp-client-service-type) (services (append (list (service dhcp-client-service-type)
;; mingetty does not work on serial lines. ;; mingetty does not work on serial lines.
;; Use agetty with board-specific serial parameters. ;; Use agetty with board-specific serial parameters.
(agetty-service (agetty-service
(agetty-configuration (agetty-configuration
(extra-options '("-L")) (extra-options '("-L"))
(baud-rate "115200") (baud-rate "115200")
(term "vt100") (term "vt100")
(tty "ttyO0"))) (tty "ttyO0"))))
%base-services))) %base-services)))

View File

@ -47,17 +47,20 @@
%base-user-accounts)) %base-user-accounts))
;; This is where we specify system-wide packages. ;; This is where we specify system-wide packages.
(packages (cons* nss-certs ;for HTTPS access (packages (append (list
gvfs ;for user mounts ;; for HTTPS access
%base-packages)) nss-certs
;; for user mounts
gvfs)
%base-packages))
;; Add GNOME and/or Xfce---we can choose at the log-in ;; Add GNOME and/or Xfce---we can choose at the log-in
;; screen with F1. Use the "desktop" services, which ;; screen with F1. Use the "desktop" services, which
;; include the X11 log-in service, networking with ;; include the X11 log-in service, networking with
;; NetworkManager, and more. ;; NetworkManager, and more.
(services (cons* (gnome-desktop-service) (services (append (list (gnome-desktop-service)
(xfce-desktop-service) (xfce-desktop-service))
%desktop-services)) %desktop-services))
;; Allow resolution of '.local' host names with mDNS. ;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss)) (name-service-switch %mdns-host-lookup-nss))

View File

@ -19,15 +19,16 @@
;; Assume the target root file system is labelled "my-root", ;; Assume the target root file system is labelled "my-root",
;; and the EFI System Partition has UUID 1234-ABCD. ;; and the EFI System Partition has UUID 1234-ABCD.
(file-systems (cons* (file-system (file-systems (append
(list (file-system
(device (file-system-label "my-root")) (device (file-system-label "my-root"))
(mount-point "/") (mount-point "/")
(type "ext4")) (type "ext4"))
(file-system (file-system
(device (uuid "1234-ABCD" 'fat)) (device (uuid "1234-ABCD" 'fat))
(mount-point "/boot/efi") (mount-point "/boot/efi")
(type "vfat")) (type "vfat")))
%base-file-systems)) %base-file-systems))
(users (cons (user-account (users (cons (user-account
(name "alice") (name "alice")
@ -40,9 +41,12 @@
;; Add a bunch of window managers; we can choose one at ;; Add a bunch of window managers; we can choose one at
;; the log-in screen with F1. ;; the log-in screen with F1.
(packages (cons* ratpoison i3-wm i3status dmenu ;window managers (packages (append (list
nss-certs ;for HTTPS access ;; window managers
%base-packages)) ratpoison i3-wm i3status dmenu
;; for HTTPS access
nss-certs)
%base-packages))
;; Use the "desktop" services, which include the X11 ;; Use the "desktop" services, which include the X11
;; log-in service, networking with NetworkManager, and more. ;; log-in service, networking with NetworkManager, and more.

View File

@ -24,7 +24,7 @@ partprobe, and then 2) resizing the filesystem with resize2fs.\n"))
(timezone "Etc/UTC") (timezone "Etc/UTC")
(locale "en_US.utf8") (locale "en_US.utf8")
(firmware '()) (firmware '())
;; Assuming /dev/sdX is the target hard disk, and "my-root" is ;; Assuming /dev/sdX is the target hard disk, and "my-root" is
;; the label of the target root file system. ;; the label of the target root file system.
@ -44,10 +44,12 @@ partprobe, and then 2) resizing the filesystem with resize2fs.\n"))
(users %base-user-accounts) (users %base-user-accounts)
;; Globally-installed packages. ;; Globally-installed packages.
(packages (cons* nvi fdisk (packages (append (list nvi fdisk
grub ; mostly so xrefs to its manual work ;; mostly so xrefs to its manual work
parted ; partprobe grub
%base-packages)) ;; partprobe
parted)
%base-packages))
(services (modify-services %base-services (services (modify-services %base-services
(login-service-type config => (login-service-type config =>