guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: guix-commits
Subject: 03/04: gnu: Replace all cons* with beginner-friendly (append (list ...)).
Date: Mon, 21 Jan 2019 16:12:29 -0500 (EST)

ambrevar pushed a commit to branch install-doc-overhaul
in repository guix.

commit 1d76baa3cfb3bba9af708de40e9f1432da8fd671
Author: Pierre Neidhardt <address@hidden>
Date:   Mon Jan 21 19:37:59 2019 +0100

    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.
---
 gnu/system/examples/bare-bones.tmpl          | 10 +++++-----
 gnu/system/examples/beaglebone-black.tmpl    | 24 ++++++++++++------------
 gnu/system/examples/desktop.tmpl             | 13 +++++++------
 gnu/system/examples/lightweight-desktop.tmpl | 14 ++++++++------
 gnu/system/examples/vm-image.tmpl            |  9 +++++----
 5 files changed, 37 insertions(+), 33 deletions(-)

diff --git a/gnu/system/examples/bare-bones.tmpl 
b/gnu/system/examples/bare-bones.tmpl
index 902dacb..a88bab0 100644
--- a/gnu/system/examples/bare-bones.tmpl
+++ b/gnu/system/examples/bare-bones.tmpl
@@ -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)))
diff --git a/gnu/system/examples/beaglebone-black.tmpl 
b/gnu/system/examples/beaglebone-black.tmpl
index efef682..1167806 100644
--- a/gnu/system/examples/beaglebone-black.tmpl
+++ b/gnu/system/examples/beaglebone-black.tmpl
@@ -43,15 +43,15 @@
                %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)))
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl
index e20b472..335343e 100644
--- a/gnu/system/examples/desktop.tmpl
+++ b/gnu/system/examples/desktop.tmpl
@@ -47,17 +47,18 @@
                %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 nss-certs     ;for HTTPS access
+                          gvfs ;for user mounts
+                          )
+                    %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))
diff --git a/gnu/system/examples/lightweight-desktop.tmpl 
b/gnu/system/examples/lightweight-desktop.tmpl
index 360ee62..bd815b6 100644
--- a/gnu/system/examples/lightweight-desktop.tmpl
+++ b/gnu/system/examples/lightweight-desktop.tmpl
@@ -19,15 +19,16 @@
 
   ;; 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")
@@ -40,9 +41,10 @@
 
   ;; 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 ratpoison i3-wm i3status dmenu ;window managers
+                          nss-certs                      ;for HTTPS access
+                          )
+                    %base-packages))
 
   ;; Use the "desktop" services, which include the X11
   ;; log-in service, networking with NetworkManager, and more.
diff --git a/gnu/system/examples/vm-image.tmpl 
b/gnu/system/examples/vm-image.tmpl
index f149f67..10e9cc9 100644
--- a/gnu/system/examples/vm-image.tmpl
+++ b/gnu/system/examples/vm-image.tmpl
@@ -44,10 +44,11 @@ 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
+                          grub          ; mostly so xrefs to its manual work
+                          parted        ; partprobe
+                          )
+                    %base-packages))
 
   (services (modify-services %base-services
               (login-service-type config =>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]