Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,17 @@
wantedBy = [ "multi-user.target" ];
after = [ "systemd-user-sessions.service" "NetworkManager.service" ];
conflicts = [ "getty@tty1.service" ];
# B-0754 iteration-2 PATH fix: systemd services on NixOS get a
# minimal PATH by default; bare commands (clear, nmtui, ping,
# systemctl, etc.) failed with 'command not found' on first real-
# hardware run. Explicit PATH covers every tool the first-boot
# script + zeta-install reach for. TERM=linux so any tput-based
# tools (curses TUIs like nmtui) get a sane terminal capability
# database without the script having to set it per-invocation.
environment = {
PATH = "/run/current-system/sw/bin:/run/current-system/sw/sbin:/run/wrappers/bin";
TERM = "linux";
};
serviceConfig = {
Type = "idle";
ExecStart = "/run/current-system/sw/bin/zeta-first-boot";
Expand Down
20 changes: 16 additions & 4 deletions full-ai-cluster/usb-nixos-installer/zeta-first-boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ ROLE_PROMPT_SECS="${ROLE_PROMPT_SECS:-10}"
# Defaults to whatever the ISO's /etc/zeta-firstboot.conf shipped with
# (typically control-plane). Press 'c' or 'w' within ${ROLE_PROMPT_SECS}s
# to choose; any other key (or timeout) keeps the default.
clear || true
# ANSI 'reset terminal' escape — no external `clear` dependency,
# works on bare tty without requiring `ncurses` + a TERM that
# tput recognises. Fixes B-0754 iteration-1 'clear: command not
# found' from the systemd unit's minimal PATH.
printf '\033c' || true
cat <<EOF

Zeta cluster installer — first boot
Expand Down Expand Up @@ -73,7 +77,11 @@ has_internet() {
ping -c 1 -W 2 -q github.com >/dev/null 2>&1
}

clear || true
# ANSI 'reset terminal' escape — no external `clear` dependency,
# works on bare tty without requiring `ncurses` + a TERM that
# tput recognises. Fixes B-0754 iteration-1 'clear: command not
# found' from the systemd unit's minimal PATH.
printf '\033c' || true
cat <<EOF

╭──────────────────────────────────────────────────────╮
Expand Down Expand Up @@ -105,8 +113,12 @@ else
read -n 1 -s -t 5 -p " Press any key to launch nmtui (or wait 5s) ..." || true
echo
echo
# nmtui returns 0 on quit regardless of whether connection succeeded
if ! nmtui; then
# nmtui returns 0 on quit regardless of whether connection succeeded.
# Absolute path: systemd unit PATH minimal; the env-var below + this
# absolute path are both defenses. Fixes B-0754 iteration-1 'nmtui:
# command not found' (nmtui IS installed in the ISO via networkmanager
# in systemPackages; the issue was PATH inheritance into the unit).
Comment thread
AceHack marked this conversation as resolved.
Outdated
if ! /run/current-system/sw/bin/nmtui; then
echo "[zeta-first-boot] nmtui failed."
drop_to_shell
fi
Expand Down
Loading