[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/12: installer: Recommended services are pre-selected.
From: |
guix-commits |
Subject: |
06/12: installer: Recommended services are pre-selected. |
Date: |
Sun, 28 Apr 2019 16:57:16 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 1d9fcdacf90764cf168ecaad5f139e7d21a4d7c6
Author: Ludovic Courtès <address@hidden>
Date: Sun Apr 28 21:45:16 2019 +0200
installer: Recommended services are pre-selected.
* gnu/installer/services.scm (<system-service>)[recommended?]: New
field.
* gnu/installer/newt/services.scm (run-desktop-environments-cbt-page):
Pass #:selection to 'run-checkbox-tree-page', computed from the
'recommended?' field of each service.
(run-networking-cbt-page): Likewise.
---
gnu/installer/newt/services.scm | 52 ++++++++++++++++++++++-------------------
gnu/installer/services.scm | 4 ++++
2 files changed, 32 insertions(+), 24 deletions(-)
diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm
index 2a22179..4f32d90 100644
--- a/gnu/installer/newt/services.scm
+++ b/gnu/installer/newt/services.scm
@@ -31,36 +31,40 @@
(define (run-desktop-environments-cbt-page)
"Run a page allowing the user to choose between various desktop
environments."
- (run-checkbox-tree-page
- #:info-text (G_ "Please select the desktop(s) environment(s) you wish to \
+ (let ((items (filter desktop-system-service? %system-services)))
+ (run-checkbox-tree-page
+ #:info-text (G_ "Please select the desktop(s) environment(s) you wish to \
install. If you select multiple desktops environments, you will be able to \
choose the one to use on the log-in screen.")
- #:title (G_ "Desktop environment")
- #:items (filter desktop-system-service? %system-services)
- #:item->text system-service-name ;no i18n for DE names
- #:checkbox-tree-height 5
- #:exit-button-callback-procedure
- (lambda ()
- (raise
- (condition
- (&installer-step-abort))))))
+ #:title (G_ "Desktop environment")
+ #:items items
+ #:selection (map system-service-recommended? items)
+ #:item->text system-service-name ;no i18n for DE names
+ #:checkbox-tree-height 8
+ #:exit-button-callback-procedure
+ (lambda ()
+ (raise
+ (condition
+ (&installer-step-abort)))))))
(define (run-networking-cbt-page)
"Run a page allowing the user to select networking services."
- (run-checkbox-tree-page
- #:info-text (G_ "You can now select networking services to run on your \
+ (let ((items (filter (lambda (service)
+ (eq? 'networking (system-service-type service)))
+ %system-services)))
+ (run-checkbox-tree-page
+ #:info-text (G_ "You can now select networking services to run on your \
system.")
- #:title (G_ "Network service")
- #:items (filter (lambda (service)
- (eq? 'networking (system-service-type service)))
- %system-services)
- #:item->text (compose G_ system-service-name)
- #:checkbox-tree-height 5
- #:exit-button-callback-procedure
- (lambda ()
- (raise
- (condition
- (&installer-step-abort))))))
+ #:title (G_ "Network service")
+ #:items items
+ #:selection (map system-service-recommended? items)
+ #:item->text (compose G_ system-service-name)
+ #:checkbox-tree-height 5
+ #:exit-button-callback-procedure
+ (lambda ()
+ (raise
+ (condition
+ (&installer-step-abort)))))))
(define (run-network-management-page)
"Run a page to select among several network management methods."
diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index 6d9d65e..0b46006 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -23,7 +23,9 @@
#:export (system-service?
system-service-name
system-service-type
+ system-service-recommended?
system-service-snippet
+ system-service-packages
desktop-system-service?
networking-system-service?
@@ -36,6 +38,8 @@
system-service?
(name system-service-name) ;string
(type system-service-type) ;'desktop | 'networking
+ (recommended? system-service-recommended? ;Boolean
+ (default #f))
(snippet system-service-snippet ;list of sexps
(default '()))
(packages system-service-packages ;list of sexps
- branch master updated (e0f3a4f -> d779de1), guix-commits, 2019/04/28
- 12/12: installer: Tell the user where the config file is., guix-commits, 2019/04/28
- 10/12: installer: User accounts can now have a "real name.", guix-commits, 2019/04/28
- 11/12: installer: Fix handling of user password mismatches., guix-commits, 2019/04/28
- 09/12: installer: User can have a "real name"., guix-commits, 2019/04/28
- 07/12: installer: Add 'nss-certs' to the networking services., guix-commits, 2019/04/28
- 08/12: installer: Improve layout of the partitioning page., guix-commits, 2019/04/28
- 06/12: installer: Recommended services are pre-selected.,
guix-commits <=
- 03/12: Update NEWS., guix-commits, 2019/04/28
- 05/12: installer: Add #:selection parameter to 'run-checkbox-tree-page'., guix-commits, 2019/04/28
- 04/12: doc: Duplicate recommendation about 'guix-install.sh'., guix-commits, 2019/04/28
- 01/12: describe: Provide a hint when origin detection fails., guix-commits, 2019/04/28
- 02/12: vm-image: Add 'nss-certs' to the global package set., guix-commits, 2019/04/28