detached d1d899f

feat(preflight): move user identity gathering to dedicated identify.sh

commit
d1d899f99de71c345e4fcf3382150ede1d7dd061
author
bnema · · 2025-10-19 17:02 UTC
committer
bnema · · 2025-10-19 20:41 UTC
parent
2c8c47f
signature
unsigned
1 file · +2 -43
M install/preflight/begin.sh +2 -43
@@ -22,50 +22,9 @@ export ARCHUP_BOOTLOADER="limine"
2222 config_set "ARCHUP_BOOTLOADER" "limine"
2323 echo "Bootloader: limine" >> "$ARCHUP_INSTALL_LOG_FILE"
2424
25-# Ask for user credentials first (will be used for user account, root, and encryption)
25+# Gather user identity (username, password, email, hostname, timezone)
2626 echo
27-gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "User Account & Security"
28-gum style --padding "0 0 0 $PADDING_LEFT" "Create account with sudo privileges. This password will be used for:"
29-gum style --padding "0 0 0 $PADDING_LEFT" " • User login with sudo access"
30-gum style --padding "0 0 0 $PADDING_LEFT" " • Disk encryption (LUKS) if enabled"
31-echo
32-
33-# Ask for username
34-ARCHUP_USERNAME=$(gum input --placeholder "Enter username" \
35- --prompt "Username: " \
36- --padding "0 0 0 $PADDING_LEFT")
37-
38-if [ -z "$ARCHUP_USERNAME" ]; then
39- gum style --foreground 1 --padding "0 0 0 $PADDING_LEFT" "Username cannot be empty!"
40- exit 1
41-fi
42-
43-# Ask for password (will be used for user, root, and LUKS encryption)
44-while true; do
45- ARCHUP_PASSWORD=$(gum input --password --placeholder "Enter password" \
46- --prompt "Password: " \
47- --padding "0 0 0 $PADDING_LEFT")
48-
49- ARCHUP_PASSWORD_CONFIRM=$(gum input --password --placeholder "Confirm password" \
50- --prompt "Confirm: " \
51- --padding "0 0 0 $PADDING_LEFT")
52-
53- if [ "$ARCHUP_PASSWORD" = "$ARCHUP_PASSWORD_CONFIRM" ]; then
54- break
55- else
56- gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "Passwords do not match. Try again."
57- fi
58-done
59-
60-export ARCHUP_USERNAME
61-export ARCHUP_PASSWORD
62-
63-# Save to config file (passwords are never logged)
64-config_set "ARCHUP_USERNAME" "$ARCHUP_USERNAME"
65-config_set "ARCHUP_PASSWORD" "$ARCHUP_PASSWORD"
66-
67-gum style --foreground 2 --padding "0 0 1 $PADDING_LEFT" "[OK] User: $ARCHUP_USERNAME"
68-echo "User: $ARCHUP_USERNAME" >> "$ARCHUP_INSTALL_LOG_FILE"
27+source "$ARCHUP_INSTALL/preflight/identify.sh"
6928
7029 # Ask for encryption preference
7130 echo
@@ -22,50 +22,9 @@ export ARCHUP_BOOTLOADER="limine"
22 config_set "ARCHUP_BOOTLOADER" "limine"22 config_set "ARCHUP_BOOTLOADER" "limine"
23 echo "Bootloader: limine" >> "$ARCHUP_INSTALL_LOG_FILE"23 echo "Bootloader: limine" >> "$ARCHUP_INSTALL_LOG_FILE"
24 24
25-# Ask for user credentials first (will be used for user account, root, and encryption)25+# Gather user identity (username, password, email, hostname, timezone)
26 echo26 echo
27-gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "User Account & Security"27+source "$ARCHUP_INSTALL/preflight/identify.sh"
28-gum style --padding "0 0 0 $PADDING_LEFT" "Create account with sudo privileges. This password will be used for:"
29-gum style --padding "0 0 0 $PADDING_LEFT" " • User login with sudo access"
30-gum style --padding "0 0 0 $PADDING_LEFT" " • Disk encryption (LUKS) if enabled"
31-echo
32-
33-# Ask for username
34-ARCHUP_USERNAME=$(gum input --placeholder "Enter username" \
35- --prompt "Username: " \
36- --padding "0 0 0 $PADDING_LEFT")
37-
38-if [ -z "$ARCHUP_USERNAME" ]; then
39- gum style --foreground 1 --padding "0 0 0 $PADDING_LEFT" "Username cannot be empty!"
40- exit 1
41-fi
42-
43-# Ask for password (will be used for user, root, and LUKS encryption)
44-while true; do
45- ARCHUP_PASSWORD=$(gum input --password --placeholder "Enter password" \
46- --prompt "Password: " \
47- --padding "0 0 0 $PADDING_LEFT")
48-
49- ARCHUP_PASSWORD_CONFIRM=$(gum input --password --placeholder "Confirm password" \
50- --prompt "Confirm: " \
51- --padding "0 0 0 $PADDING_LEFT")
52-
53- if [ "$ARCHUP_PASSWORD" = "$ARCHUP_PASSWORD_CONFIRM" ]; then
54- break
55- else
56- gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "Passwords do not match. Try again."
57- fi
58-done
59-
60-export ARCHUP_USERNAME
61-export ARCHUP_PASSWORD
62-
63-# Save to config file (passwords are never logged)
64-config_set "ARCHUP_USERNAME" "$ARCHUP_USERNAME"
65-config_set "ARCHUP_PASSWORD" "$ARCHUP_PASSWORD"
66-
67-gum style --foreground 2 --padding "0 0 1 $PADDING_LEFT" "[OK] User: $ARCHUP_USERNAME"
68-echo "User: $ARCHUP_USERNAME" >> "$ARCHUP_INSTALL_LOG_FILE"
69 28
70 # Ask for encryption preference29 # Ask for encryption preference
71 echo30 echo

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 0

    ↑↓ moveenter openesc close