From 81107cd977cc63a893ac61890c8d4fadfeafc079 Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Sun, 5 Apr 2026 15:00:32 +0000 Subject: [PATCH] Simplify wizard: all jails default, fewer questions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Baremetal wizard reduced from 11 interactions to 5: 1. Disclaimer 2. Assistant name 3. Domain + DNS note 4. Timezone 5. SSH key + Tailscale (optional) Removed questions (now always-on defaults): - Agent gender → defaults to "f" - Forgejo toggle → always YES (FEATURE_GITEA=YES) - Local LLM provider → defaults to "none" (enable post-install) - Ollama HPP → NO - CODE_HOSTING_MODE → always "gitea" All jails (db, git/forgejo, cms) provision out of the box. shell-env.sh defaults aligned: FEATURE_GITEA=YES, CODE_HOSTING_MODE=gitea. Integration test: PASS | Cloud path test: PASS (17/17) Co-Authored-By: Claude Opus 4.6 --- firstboot/firstboot.sh | 62 ++++++++++++------------------------------ firstboot/shell-env.sh | 4 +-- 2 files changed, 20 insertions(+), 46 deletions(-) diff --git a/firstboot/firstboot.sh b/firstboot/firstboot.sh index 4ecf0e4b..5752744b 100644 --- a/firstboot/firstboot.sh +++ b/firstboot/firstboot.sh @@ -123,12 +123,13 @@ elif [ "${TARGET:-baremetal}" = "cloud" ]; then log_msg "[firstboot] Cloud — pre-baked config OK" step_done "wizard" else - # Baremetal: wizard for simple inputs only - # API keys are NOT collected here — deferred to web UI on first desktop login + # Baremetal: minimal wizard — identity, network, keys only + # All jails (db, git/forgejo, cms) are provisioned by default. + # API keys are deferred to web UI on first desktop login. _dialog() { bsddialog --backtitle "Clawdie-AI Setup" "$@" 2>&1; } _dialog --msgbox "\ -⚠ EXPERIMENTAL BUILD +EXPERIMENTAL BUILD This is pre-release software. Not recommended for production use. @@ -137,10 +138,6 @@ Data loss or service interruption possible. By continuing, you assume all risks." 12 60 ASSISTANT_NAME=$(_dialog --inputbox "Assistant name:" 8 50 "Clawdie") - AGENT_GENDER=$(_dialog --radiolist "Agent gender (affects grammar):" 10 50 3 \ - "f" "Female" on \ - "m" "Male" off \ - "n" "Neutral" off) AGENT_DOMAIN=$(_dialog --inputbox \ "Domain zone (public or local, e.g. home.arpa):" 8 60 "home.arpa") if command -v route >/dev/null 2>&1 && command -v ifconfig >/dev/null 2>&1; then @@ -155,58 +152,35 @@ By continuing, you assume all risks." 12 60 if [ -n "$HOST_IPS" ]; then HOST_IPS_LINE="$(echo "$HOST_IPS" | tr '\n' ' ' | sed 's/ $//')" _dialog --msgbox "\ -DNS note: If you use home.arpa, create an A record for .home.arpa pointing to this host IP. +DNS note: If you use home.arpa, create an A record for +.home.arpa pointing to this host IP. + Detected IP(s): ${HOST_IPS_LINE}" 10 70 fi fi TZ=$(_dialog --inputbox \ "Timezone (e.g. Europe/Ljubljana):" 8 50 "UTC") - _dialog --msgbox "\ -Local LLMs use significant resources.\n\ -Typical models need 4–20 GB disk each and 8–16 GB RAM." 9 60 - LOCAL_LLM_PROVIDER=$(_dialog --radiolist "Local LLM runtime:" 12 64 3 \ - "none" "No local LLM (cloud only)" on \ - "ollama" "Ollama (easiest) — RAM ${OLLAMA_RAM_ESTIMATE:-8-16 GB}, disk ${OLLAMA_DISK_ESTIMATE:-4-20 GB}" off \ - "llama_cpp" "llama-cpp (lightweight) — RAM ${LLAMA_CPP_RAM_ESTIMATE:-8-16 GB}, disk ${LLAMA_CPP_DISK_ESTIMATE:-4-20 GB}" off) - if [ "$LOCAL_LLM_PROVIDER" = "ollama" ]; then - FEATURE_OLLAMA="YES" - FEATURE_LLAMA_CPP="NO" - if _dialog --yesno \ - "Install Ollama C++ bindings (ollama-hpp)?\nUseful for C++ clients only." 9 60; then - FEATURE_OLLAMA_HPP="YES" - else - FEATURE_OLLAMA_HPP="NO" - fi - elif [ "$LOCAL_LLM_PROVIDER" = "llama_cpp" ]; then - FEATURE_OLLAMA="NO" - FEATURE_LLAMA_CPP="YES" - FEATURE_OLLAMA_HPP="NO" - else - LOCAL_LLM_PROVIDER="none" - FEATURE_OLLAMA="NO" - FEATURE_LLAMA_CPP="NO" - FEATURE_OLLAMA_HPP="NO" - fi SSH_PUBLIC_KEY=$(_dialog --inputbox \ "SSH public key (optional — paste ssh-ed25519 or ssh-rsa):" 12 70 "") if _dialog --yesno \ "Enable Tailscale for remote access?\nRecommended for SSH without public exposure." 9 70; then FEATURE_TAILSCALE="YES" TAILSCALE_AUTHKEY=$(_dialog --passwordbox \ - "Optional Tailscale device auth key (tskey-...).\nRecommended: reusable key for host + jails.\nLeave blank to complete login after boot." 12 72 "") + "Tailscale device auth key (tskey-...).\nRecommended: reusable key for host + jails.\nLeave blank to complete login after boot." 12 72 "") else FEATURE_TAILSCALE="NO" TAILSCALE_AUTHKEY="" fi - if _dialog --yesno \ - "Enable web git UI (Forgejo)?\nAdds approx ${FORGEJO_DISK_ESTIMATE:-1.2 GB} of disk usage." 9 60; then - FEATURE_GITEA="YES" - CODE_HOSTING_MODE="gitea" - else - FEATURE_GITEA="NO" - CODE_HOSTING_MODE="git" - fi - : "${FEATURE_GIT:=YES}" + + # Defaults: all jails enabled, no local LLM (can be enabled post-install) + : "${AGENT_GENDER:=f}" + FEATURE_GIT="YES" + FEATURE_GITEA="YES" + CODE_HOSTING_MODE="gitea" + LOCAL_LLM_PROVIDER="none" + FEATURE_OLLAMA="NO" + FEATURE_LLAMA_CPP="NO" + FEATURE_OLLAMA_HPP="NO" step_done "wizard" fi diff --git a/firstboot/shell-env.sh b/firstboot/shell-env.sh index 2786e902..2d03d3e5 100755 --- a/firstboot/shell-env.sh +++ b/firstboot/shell-env.sh @@ -117,8 +117,8 @@ WARDEN_GATEWAY="${AGENT_SUBNET_BASE}.1" # === Features (optional) === FEATURE_TELEGRAM="${FEATURE_TELEGRAM:-NO}" FEATURE_GIT="${FEATURE_GIT:-YES}" -FEATURE_GITEA="${FEATURE_GITEA:-NO}" -CODE_HOSTING_MODE="${CODE_HOSTING_MODE:-git}" +FEATURE_GITEA="${FEATURE_GITEA:-YES}" +CODE_HOSTING_MODE="${CODE_HOSTING_MODE:-gitea}" FEATURE_TAILSCALE="${FEATURE_TAILSCALE:-NO}" TAILSCALE_AUTHKEY="${TAILSCALE_AUTHKEY:-}" LOCAL_LLM_PROVIDER="${LOCAL_LLM_PROVIDER:-none}"