diff options
author | Janneke Nieuwenhuizen <[email protected]> | 2024-10-15 23:27:17 +0200 |
---|---|---|
committer | Jan (janneke) Nieuwenhuizen <[email protected]> | 2024-11-11 07:28:35 +0100 |
commit | 9aeb8e3dee32254a19a68971f26e214c7b717e5b (patch) | |
tree | cb8481b13c3b9a1a3ffd4692709c46371dcf631c /gnu/installer/newt/keymap.scm | |
parent | cca544513b7c01e1cff33ac0c690031406dceac6 (diff) |
installer: Add dry-run?
This allows running the installer without root privileges. Do something like
./pre-inst-env guix repl
,use (guix)
,use (gnu installer)
(installer-program #:dry-run? #t)
,build $1
=>
"/gnu/store/...-installer-program"
and run
/gnu/store/...-installer-program
* gnu/installer/newt.scm (locale-page): Add #:dry-run? parameter.
(keymap-page): Likewise.
* gnu/installer/newt/keymap.scm (run-keymap-page): Likewise.
* gnu/installer/steps.scm (run-installer-steps): Likewise. Use it to skip
writing to socket.
* gnu/installer/newt/final.scm (run-final-page): Rename to...
(run-final-page-install): ...this.
(dry-run-final-page, run-final-page): New procedures.
* gnu/installer/parted.scm (bootloader-configuration): Cater for empty user
partitions.
* gnu/installer/utils.scm (dry-run-command): New procedure.
* gnu/installer.scm (compute-locale-step): Add #:dry-run? parameter. Use it
to avoid actually applying locale.
(compute-keymap-step): Add dry-run? parameter. Pass it to
keymap-page.
(installer-program): Add #:dry-run? parameter. If #:true
avoid writing to /proc, use dry-run-command, skip sync and reboot, and pass
dry-run? to...
(installer-steps): ...here. Add #:dry-run? parameter. Use it to disable
skip network, substitutes, partitioning pages, and pass it to...
compute-locale-step, compute-keymap-step, and final-page.
Change-Id: I0ff4c3b0a0c69539af617c27ba37654beed44619
Diffstat (limited to 'gnu/installer/newt/keymap.scm')
-rw-r--r-- | gnu/installer/newt/keymap.scm | 5 |
1 files changed, 3 insertions, 2 deletions
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 |