summaryrefslogtreecommitdiff
path: root/gnu/installer/newt
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/installer/newt')
-rw-r--r--gnu/installer/newt/final.scm20
-rw-r--r--gnu/installer/newt/keymap.scm5
-rw-r--r--gnu/installer/newt/locale.scm6
-rw-r--r--gnu/installer/newt/partition.scm1
4 files changed, 27 insertions, 5 deletions
diff --git a/gnu/installer/newt/final.scm b/gnu/installer/newt/final.scm
index 9f950a0551..c4e53f6d79 100644
--- a/gnu/installer/newt/final.scm
+++ b/gnu/installer/newt/final.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018, 2020 Mathieu Othacehe <[email protected]>
;;; Copyright © 2019, 2020 Ludovic Courtès <[email protected]>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -106,7 +107,7 @@ a specific step, or restart the installer."))
(newt-resume)
install-ok?))
-(define (run-final-page result prev-steps)
+(define (run-final-page-install result prev-steps)
(define (wait-for-clients)
(unless (null? (current-clients))
(installer-log-line "waiting with clients before starting final step")
@@ -133,3 +134,20 @@ a specific step, or restart the installer."))
(if install-ok?
(run-install-success-page)
(run-install-failed-page))))
+
+(define (dry-run-final-page result prev-steps)
+ (installer-log-line "proceeding with final step -- dry-run")
+ (let* ((configuration (format-configuration prev-steps result))
+ (user-partitions (result-step result 'partition))
+ (locale (result-step result 'locale))
+ (users (result-step result 'user))
+ (file (configuration->file configuration))
+ (install-ok? (run-config-display-page #:locale locale)))
+ (if install-ok?
+ (run-install-success-page)
+ (run-install-failed-page))))
+
+(define (run-final-page result prev-steps dry-run?)
+ (if dry-run?
+ (dry-run-final-page result prev-steps)
+ (run-final-page-install result prev-steps)))
diff --git a/gnu/installer/newt/keymap.scm b/gnu/installer/newt/keymap.scm
index 109ec55e0a..57f6d6530c 100644
--- a/gnu/installer/newt/keymap.scm
+++ b/gnu/installer/newt/keymap.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2018, 2020 Mathieu Othacehe <[email protected]>
;;; Copyright © 2019 Ludovic Courtès <[email protected]>
;;; Copyright © 2020 Florian Pelz <[email protected]>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -153,7 +154,7 @@ and #f."
"grp:alt_shift_toggle"))
(list layout variant #f)))
-(define* (run-keymap-page layouts #:key (context #f))
+(define* (run-keymap-page layouts #:key context dry-run?)
"Run a page asking the user to select a keyboard layout and variant. LAYOUTS
is a list of supported X11-KEYMAP-LAYOUT. For non-Latin keyboard layouts, a
second layout and toggle options will be added automatically. Return a list
@@ -201,7 +202,7 @@ options."
"xkeyboard-config")))))
(toggleable-latin-layout layout variant)))
- (let* ((result (run-installer-steps #:steps keymap-steps))
+ (let* ((result (run-installer-steps #:steps keymap-steps #:dry-run? dry-run?))
(layout (result-step result 'layout))
(variant (result-step result 'variant)))
(and layout
diff --git a/gnu/installer/newt/locale.scm b/gnu/installer/newt/locale.scm
index a226b39ba6..0be9db449e 100644
--- a/gnu/installer/newt/locale.scm
+++ b/gnu/installer/newt/locale.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Mathieu Othacehe <[email protected]>
;;; Copyright © 2019 Ludovic Courtès <[email protected]>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -92,7 +93,8 @@ symbol.")
(define* (run-locale-page #:key
supported-locales
iso639-languages
- iso3166-territories)
+ iso3166-territories
+ dry-run?)
"Run a page asking the user to select a locale language and possibly
territory, codeset and modifier. Use SUPPORTED-LOCALES as the list of glibc
available locales. ISO639-LANGUAGES is an association list associating a
@@ -212,4 +214,4 @@ glibc locale string and return it."
;; step, turn the result into a glibc locale string and return it.
(result->locale-string
supported-locales
- (run-installer-steps #:steps locale-steps)))
+ (run-installer-steps #:steps locale-steps #:dry-run? dry-run?)))
diff --git a/gnu/installer/newt/partition.scm b/gnu/installer/newt/partition.scm
index 37656696c1..48dd306080 100644
--- a/gnu/installer/newt/partition.scm
+++ b/gnu/installer/newt/partition.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2018, 2019, 2022 Mathieu Othacehe <[email protected]>
;;; Copyright © 2019, 2020 Ludovic Courtès <[email protected]>
;;; Copyright © 2020 Tobias Geerinckx-Rice <[email protected]>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;