aboutsummaryrefslogtreecommitdiff
path: root/gnu/installer/newt/services.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-07 21:20:10 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-07 22:23:50 +0200
commit2e55f37c0c8fdfbc413edff61490161648a78dcc (patch)
treee4af97dedacf5c01a59ac38444dbb62cad9f8ed7 /gnu/installer/newt/services.scm
parentecfbc51faac789681549bb2e1b97ca1058c6324d (diff)
downloadguix-2e55f37c0c8fdfbc413edff61490161648a78dcc.tar
guix-2e55f37c0c8fdfbc413edff61490161648a78dcc.tar.gz
installer: Offer NM, Connman, and DHCP to non-desktop installs.
* gnu/installer/services.scm (%system-services): Add NetworkManager, Connman, and the DHCP client. * gnu/installer/newt/services.scm (run-networking-cbt-page): Add 'network-management?' parameter and honor it. (run-services-page): Adjust call accordingly.
Diffstat (limited to 'gnu/installer/newt/services.scm')
-rw-r--r--gnu/installer/newt/services.scm22
1 files changed, 16 insertions, 6 deletions
diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm
index e1faf4871d..76db31d9ab 100644
--- a/gnu/installer/newt/services.scm
+++ b/gnu/installer/newt/services.scm
@@ -45,13 +45,20 @@ choose the one to use on the log-in screen.")
(condition
(&installer-step-abort))))))
-(define (run-networking-cbt-page)
- "Run a page allowing the user to select networking services."
+(define (run-networking-cbt-page network-management?)
+ "Run a page allowing the user to select networking services. When
+NETWORK-MANAGEMENT? is true, include network management services like
+NetworkManager."
(run-checkbox-tree-page
- #:info-text (G_ "You can now select networking services to run on your
+ #:info-text (G_ "You can now select networking services to run on your \
system.")
#:title (G_ "Network service")
- #:items (filter networking-system-service? %system-services)
+ #:items (filter (let ((types (if network-management?
+ '(network-management networking)
+ '(networking))))
+ (lambda (service)
+ (memq (system-service-type service) types)))
+ %system-services)
#:item->text system-service-name
#:checkbox-tree-height 5
#:exit-button-callback-procedure
@@ -61,5 +68,8 @@ system.")
(&installer-step-abort))))))
(define (run-services-page)
- (append (run-desktop-environments-cbt-page)
- (run-networking-cbt-page)))
+ (let ((desktop (run-desktop-environments-cbt-page)))
+ ;; When the user did not select any desktop services, and thus didn't get
+ ;; '%desktop-services', offer network management services.
+ (append desktop
+ (run-networking-cbt-page (null? desktop)))))