From b204a718556fa3f3a19a358f3b16985c08247ca7 Mon Sep 17 00:00:00 2001 From: Izan Gil <66965250+SrIzan10@users.noreply.github.com> Date: Sun, 22 Mar 2026 22:23:24 +0100 Subject: [PATCH] fix: password must be set --- configuration.nix | 2 +- install.sh | 24 +++++++++++++++--------- update-launcher.sh | 4 ---- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/configuration.nix b/configuration.nix index cdbeb44..c84f8e4 100644 --- a/configuration.nix +++ b/configuration.nix @@ -219,7 +219,7 @@ in ]; password = username; }; - users.users.root.initialPassword = "toor"; + environment.systemPackages = with pkgs; [ chromium diff --git a/install.sh b/install.sh index 03a22aa..c337577 100644 --- a/install.sh +++ b/install.sh @@ -28,9 +28,8 @@ By default the script will prompt for Andared Wi-Fi credentials. Press Enter on an empty username to skip. Use --no-andared to suppress the prompt entirely. -If a TTY is available, the installer will also offer to change the -root password. Press Enter on an empty root password prompt to keep -the default configured password. +If a TTY is available, the installer will prompt you to set a root +password. You must provide a root password to proceed with installation. EOF } @@ -73,14 +72,14 @@ prompt_secret_confirm() { value="$(prompt_secret "$prompt")" if [ -z "$value" ]; then - printf '%s' "" - return 0 + echo "La contraseña no puede estar vacía." >&2 + return 1 fi confirm="$(prompt_secret 'Repite la contraseña: ')" if [ "$value" != "$confirm" ]; then echo "Las contraseñas no coinciden." >&2 - exit 1 + return 1 fi printf '%s' "$value" @@ -388,9 +387,16 @@ main() { fi fi - if [ -z "$root_password" ] && [ -c /dev/tty ]; then - printf '\n' > /dev/tty - root_password="$(prompt_secret_confirm 'Contraseña root (Enter para mantener la predeterminada): ')" + if [ -z "$root_password" ]; then + if [ -c /dev/tty ]; then + printf '\n' > /dev/tty + while [ -z "$root_password" ]; do + root_password="$(prompt_secret_confirm 'Contraseña root (obligatoria): ')" || root_password="" + done + else + echo "Se requiere una contraseña root. Usa --root-password o ejecuta en una terminal." >&2 + exit 1 + fi fi cleanup_mounts diff --git a/update-launcher.sh b/update-launcher.sh index aad412c..18b99ff 100755 --- a/update-launcher.sh +++ b/update-launcher.sh @@ -43,10 +43,6 @@ main() { exit 1 } - if "$monitor_bin" --has-active-update; then - open_terminal "$terminal" "$monitor_bin" --watch - fi - if command -v kdialog >/dev/null 2>&1; then choice="$( kdialog \