summaryrefslogtreecommitdiff
path: root/gnu/installer
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/installer')
-rw-r--r--gnu/installer/newt/partition.scm6
-rw-r--r--gnu/installer/newt/services.scm25
-rw-r--r--gnu/installer/services.scm9
-rw-r--r--gnu/installer/steps.scm2
-rw-r--r--gnu/installer/tests.scm11
5 files changed, 45 insertions, 8 deletions
diff --git a/gnu/installer/newt/partition.scm b/gnu/installer/newt/partition.scm
index 1c0444b67f..fe30953a41 100644
--- a/gnu/installer/newt/partition.scm
+++ b/gnu/installer/newt/partition.scm
@@ -643,8 +643,10 @@ edit it."
default-result))))
((partition? item)
(if (freespace-partition? item)
- (run-error-page (G_ "You cannot delete a free space area.")
- (G_ "Delete partition"))
+ (begin
+ (run-error-page (G_ "You cannot delete a free space area.")
+ (G_ "Delete partition"))
+ default-result)
(let* ((disk (partition-disk item))
(number-str (partition-print-number item))
(info-text
diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm
index 74f28e41ba..1af4e7df2d 100644
--- a/gnu/installer/newt/services.scm
+++ b/gnu/installer/newt/services.scm
@@ -68,6 +68,28 @@ system.")
(condition
(&installer-step-abort)))))))
+(define (run-other-services-cbt-page)
+ "Run a page allowing the user to select other services."
+ (let ((items (filter (lambda (service)
+ (not (member (system-service-type service)
+ '(desktop
+ network-management
+ networking))))
+ %system-services)))
+ (run-checkbox-tree-page
+ #:info-text (G_ "You can now select other services to run on your \
+system.")
+ #:title (G_ "Other services")
+ #:items items
+ #:selection (map system-service-recommended? items)
+ #:item->text (compose G_ system-service-name)
+ #:checkbox-tree-height 9
+ #: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."
(let ((title (G_ "Network management")))
@@ -100,4 +122,5 @@ client may be enough for a server.")
(run-networking-cbt-page)
(if (null? desktop)
(list (run-network-management-page))
- '()))))
+ '())
+ (run-other-services-cbt-page))))
diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index b0007218ae..341d8b69c8 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -117,7 +118,13 @@
(system-service
(name (G_ "DHCP client (dynamic IP address assignment)"))
(type 'network-management)
- (snippet '((service dhcp-client-service-type)))))))
+ (snippet '((service dhcp-client-service-type))))
+
+ ;; Dealing with documents.
+ (system-service
+ (name (G_ "CUPS printing system (no Web interface by default)"))
+ (type 'document)
+ (snippet '((service cups-service-type)))))))
(define (desktop-system-service? service)
"Return true if SERVICE is a desktop environment service."
diff --git a/gnu/installer/steps.scm b/gnu/installer/steps.scm
index 057f2ae163..c05dfa567a 100644
--- a/gnu/installer/steps.scm
+++ b/gnu/installer/steps.scm
@@ -235,7 +235,7 @@ found in RESULTS."
'())))
steps))
(modules '((use-modules (gnu))
- (use-service-modules desktop networking ssh xorg))))
+ (use-service-modules cups desktop networking ssh xorg))))
`(,@modules
()
(operating-system ,@configuration))))
diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm
index 8ccd327a7c..12d1d91608 100644
--- a/gnu/installer/tests.scm
+++ b/gnu/installer/tests.scm
@@ -220,8 +220,9 @@ ROOT-PASSWORD, and USERS."
(string-contains service "NSS"))))
(choose-network-management-tool?
(lambda (service)
- (string-contains service "DHCP"))))
- "Converse over PORT to choose networking services."
+ (string-contains service "DHCP")))
+ (choose-other-service? (const #f)))
+ "Converse over PORT to choose services."
(define desktop-environments '())
(converse port
@@ -240,7 +241,11 @@ ROOT-PASSWORD, and USERS."
(multiple-choices? #f)
(items ,services))
(null? desktop-environments)
- (find choose-network-management-tool? services))))
+ (find choose-network-management-tool? services))
+
+ ((checkbox-list (title "Other services") (text _)
+ (items ,services))
+ (filter choose-other-service? services))))
(define (edit-configuration-file file)
"Edit FILE, an operating system configuration file generated by the