gnu: Replace all cons* with beginner-friendly (append (list ...)).
authorPierre Neidhardt <mail@ambrevar.xyz>
Mon, 21 Jan 2019 18:37:59 +0000 (19:37 +0100)
committerPierre Neidhardt <mail@ambrevar.xyz>
Wed, 23 Jan 2019 17:01:16 +0000 (18:01 +0100)
* 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.

gnu/system/examples/bare-bones.tmpl
gnu/system/examples/beaglebone-black.tmpl
gnu/system/examples/desktop.tmpl
gnu/system/examples/lightweight-desktop.tmpl
gnu/system/examples/vm-image.tmpl

index 902dacb..a88bab0 100644 (file)
@@ -44,8 +44,8 @@
 
   ;; Add services to the baseline: a DHCP client and
   ;; an SSH server.
-  (services (cons* (service dhcp-client-service-type)
-                   (service openssh-service-type
-                            (openssh-configuration
-                              (port-number 2222)))
-                   %base-services)))
+  (services (append (list (service dhcp-client-service-type)
+                          (service openssh-service-type
+                                   (openssh-configuration
+                                    (port-number 2222))))
+                    %base-services)))
index efef682..1167806 100644 (file)
                %base-user-accounts))
 
   ;; Globally-installed packages.
-  (packages (cons* screen openssh %base-packages))
-
-  (services (cons* (service dhcp-client-service-type)
-                   ;; mingetty does not work on serial lines.
-                   ;; Use agetty with board-specific serial parameters.
-                   (agetty-service
-                    (agetty-configuration
-                     (extra-options '("-L"))
-                     (baud-rate "115200")
-                     (term "vt100")
-                     (tty "ttyO0")))
-                   %base-services)))
+  (packages (append (list screen openssh) %base-packages))
+
+  (services (append (list (service dhcp-client-service-type)
+                          ;; mingetty does not work on serial lines.
+                          ;; Use agetty with board-specific serial parameters.
+                          (agetty-service
+                           (agetty-configuration
+                            (extra-options '("-L"))
+                            (baud-rate "115200")
+                            (term "vt100")
+                            (tty "ttyO0"))))
+                  %base-services)))
index e20b472..c59bf92 100644 (file)
                %base-user-accounts))
 
   ;; This is where we specify system-wide packages.
-  (packages (cons* nss-certs         ;for HTTPS access
-                   gvfs              ;for user mounts
-                   %base-packages))
+  (packages (append (list
+                     ;; for HTTPS access
+                     nss-certs
+                     ;; for user mounts
+                     gvfs)
+                    %base-packages))
 
   ;; Add GNOME and/or Xfce---we can choose at the log-in
   ;; screen with F1.  Use the "desktop" services, which
   ;; include the X11 log-in service, networking with
   ;; NetworkManager, and more.
-  (services (cons* (gnome-desktop-service)
-                   (xfce-desktop-service)
-                   %desktop-services))
+  (services (append (list (gnome-desktop-service)
+                          (xfce-desktop-service))
+                    %desktop-services))
 
   ;; Allow resolution of '.local' host names with mDNS.
   (name-service-switch %mdns-host-lookup-nss))
index 360ee62..a234bad 100644 (file)
 
   ;; Assume the target root file system is labelled "my-root",
   ;; 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"))
                          (mount-point "/")
                          (type "ext4"))
                        (file-system
                          (device (uuid "1234-ABCD" 'fat))
                          (mount-point "/boot/efi")
-                         (type "vfat"))
-                       %base-file-systems))
+                         (type "vfat")))
+                 %base-file-systems))
 
   (users (cons (user-account
                 (name "alice")
 
   ;; Add a bunch of window managers; we can choose one at
   ;; the log-in screen with F1.
-  (packages (cons* ratpoison i3-wm i3status dmenu ;window managers
-                   nss-certs                      ;for HTTPS access
-                   %base-packages))
+  (packages (append (list
+                     ;; window managers
+                     ratpoison i3-wm i3status dmenu
+                     ;; for HTTPS access
+                     nss-certs)
+                    %base-packages))
 
   ;; Use the "desktop" services, which include the X11
   ;; log-in service, networking with NetworkManager, and more.
index f149f67..4d292c1 100644 (file)
@@ -24,7 +24,7 @@ partprobe, and then 2) resizing the filesystem with resize2fs.\n"))
   (timezone "Etc/UTC")
   (locale "en_US.utf8")
 
-(firmware '())
+  (firmware '())
 
   ;; Assuming /dev/sdX is the target hard disk, and "my-root" is
   ;; 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)
 
   ;; Globally-installed packages.
-  (packages (cons* nvi fdisk
-                   grub   ; mostly so xrefs to its manual work
-                   parted ; partprobe
-                   %base-packages))
+  (packages (append (list nvi fdisk
+                          ;; mostly so xrefs to its manual work
+                          grub
+                          ;; partprobe
+                          parted)
+                    %base-packages))
 
   (services (modify-services %base-services
               (login-service-type config =>