diff options
Diffstat (limited to 'gnu/installer/newt')
-rw-r--r-- | gnu/installer/newt/network.scm | 21 | ||||
-rw-r--r-- | gnu/installer/newt/partition.scm | 9 | ||||
-rw-r--r-- | gnu/installer/newt/services.scm | 41 |
3 files changed, 55 insertions, 16 deletions
diff --git a/gnu/installer/newt/network.scm b/gnu/installer/newt/network.scm index 4af7143d63..fb221483c3 100644 --- a/gnu/installer/newt/network.scm +++ b/gnu/installer/newt/network.scm @@ -30,6 +30,8 @@ #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (ice-9 match) + #:use-module (web client) + #:use-module (web response) #:use-module (newt) #:export (run-network-page)) @@ -119,8 +121,23 @@ network devices were found. Do you want to continue anyway?")) (define (wait-service-online) "Display a newt scale until connman detects an Internet access. Do FULL-VALUE tentatives, spaced by 1 second." + (define (ci-available?) + (dynamic-wind + (lambda () + (sigaction SIGALRM + (lambda _ #f)) + (alarm 3)) + (lambda () + (false-if-exception + (= (response-code + (http-request "https://ci.guix.gnu.org")) + 200))) + (lambda () + (alarm 0)))) + (define (online?) - (or (connman-online?) + (or (and (connman-online?) + (ci-available?)) (file-exists? "/tmp/installer-assume-online"))) (let* ((full-value 5)) @@ -137,7 +154,7 @@ FULL-VALUE tentatives, spaced by 1 second." (unless (online?) (run-error-page (G_ "The selected network does not provide access to the \ -Internet, please try again.") +Internet and the Guix substitute server, please try again.") (G_ "Connection error")) (raise (condition diff --git a/gnu/installer/newt/partition.scm b/gnu/installer/newt/partition.scm index 70c11ed8ad..ccc7686906 100644 --- a/gnu/installer/newt/partition.scm +++ b/gnu/installer/newt/partition.scm @@ -83,7 +83,8 @@ DEVICES list." devices)) (let* ((result (run-listbox-selection-page - #:info-text (G_ "Please select a disk.") + #:info-text (G_ "Please select a \ +disk. The installation device as well as the small devices are filtered.") #:title (G_ "Disk") #:listbox-items (device-items) #:listbox-item->text cdr @@ -792,13 +793,13 @@ by pressing the Exit button.~%~%"))) result-user-partitions))))) (init-parted) - (let* ((non-install-devices (non-install-devices)) - (user-partitions (run-page non-install-devices)) + (let* ((eligible-devices (eligible-devices)) + (user-partitions (run-page eligible-devices)) (user-partitions-with-pass (prompt-luks-passwords user-partitions)) (form (draw-formatting-page user-partitions))) ;; Make sure the disks are not in use before proceeding to formatting. - (free-parted non-install-devices) + (free-parted eligible-devices) (format-user-partitions user-partitions-with-pass) (syslog "formatted ~a user partitions~%" (length user-partitions-with-pass)) diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm index 1af4e7df2d..c218825813 100644 --- a/gnu/installer/newt/services.scm +++ b/gnu/installer/newt/services.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2021 Leo Famulari <leo@famulari.name> ;;; ;;; This file is part of GNU Guix. ;;; @@ -68,18 +69,16 @@ system.") (condition (&installer-step-abort))))))) -(define (run-other-services-cbt-page) - "Run a page allowing the user to select other services." +(define (run-printing-services-cbt-page) + "Run a page allowing the user to select document services such as CUPS." (let ((items (filter (lambda (service) - (not (member (system-service-type service) - '(desktop - network-management - networking)))) + (eq? 'document + (system-service-type service))) %system-services))) (run-checkbox-tree-page - #:info-text (G_ "You can now select other services to run on your \ + #:info-text (G_ "You can now select the CUPS printing service to run on your \ system.") - #:title (G_ "Other services") + #:title (G_ "Printing and document services") #:items items #:selection (map system-service-recommended? items) #:item->text (compose G_ system-service-name) @@ -90,6 +89,27 @@ system.") (condition (&installer-step-abort))))))) +(define (run-console-services-cbt-page) + "Run a page to select various system adminstration services for non-graphical +systems." + (let ((items (filter (lambda (service) + (eq? 'administration + (system-service-type service))) + %system-services))) + (run-checkbox-tree-page + #:title (G_ "Console services") + #:info-text (G_ "Select miscellaneous services to run on your \ +non-graphical system.") + #: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." (let ((title (G_ "Network management"))) @@ -121,6 +141,7 @@ client may be enough for a server.") (append desktop (run-networking-cbt-page) (if (null? desktop) - (list (run-network-management-page)) + (cons (run-network-management-page) + (run-console-services-cbt-page)) '()) - (run-other-services-cbt-page)))) + (run-printing-services-cbt-page)))) |