aboutsummaryrefslogtreecommitdiff
path: root/gnu/installer/steps.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/installer/steps.scm')
-rw-r--r--gnu/installer/steps.scm30
1 files changed, 20 insertions, 10 deletions
diff --git a/gnu/installer/steps.scm b/gnu/installer/steps.scm
index 0c505e40e4..34dd14c9d5 100644
--- a/gnu/installer/steps.scm
+++ b/gnu/installer/steps.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,6 +23,7 @@
#:use-module (guix build utils)
#:use-module (guix i18n)
#:use-module (guix read-print)
+ #:use-module (guix utils)
#:use-module (gnu installer utils)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
@@ -84,7 +86,8 @@
(define* (run-installer-steps #:key
steps
(rewind-strategy 'previous)
- (menu-proc (const #f)))
+ (menu-proc (const #f))
+ dry-run?)
"Run the COMPUTE procedure of all <installer-step> records in STEPS
sequentially, inside a the 'installer-step prompt. When aborted to with a
parameter of 'abort, fallback to a previous install-step, accordingly to the
@@ -191,10 +194,14 @@ computation is over."
;; prematurely.
(sigaction SIGPIPE SIG_IGN)
- (with-server-socket
- (run '()
- #:todo-steps steps
- #:done-steps '())))
+ (if dry-run?
+ (run '()
+ #:todo-steps steps
+ #:done-steps '())
+ (with-server-socket
+ (run '()
+ #:todo-steps steps
+ #:done-steps '()))))
(define (find-step-by-id steps id)
"Find and return the step in STEPS whose id is equal to ID."
@@ -234,17 +241,20 @@ found in RESULTS."
,(comment (G_ "\
;; Indicate which modules to import to access the variables
;; used in this configuration.\n"))
- (use-modules (gnu))
+ ,@(if (target-hurd?)
+ '((use-modules (gnu) (gnu system hurd))
+ (use-package-modules hurd ssh))
+ '((use-modules (gnu))))
(use-service-modules cups desktop networking ssh xorg))))
`(,@modules
,(vertical-space 1)
(operating-system ,@configuration))))
(define* (configuration->file configuration
- #:key (filename (%installer-configuration-file)))
- "Write the given CONFIGURATION to FILENAME."
- (mkdir-p (dirname filename))
- (call-with-output-file filename
+ #:key (file-name (%installer-configuration-file)))
+ "Write the given CONFIGURATION to FILE-NAME."
+ (mkdir-p (dirname file-name))
+ (call-with-output-file file-name
(lambda (port)
;; TRANSLATORS: This is a comment within a Scheme file. Each line must
;; start with ";; " (two semicolons and a space). Please keep line