From eb9112ae45164db09ea66eccbf0bf2321ca5e93a Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 7 May 2026 12:49:31 +0200 Subject: [PATCH] Allow all valid hostnames Closes #69 --- configs/airootfs/root/configurator | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/airootfs/root/configurator b/configs/airootfs/root/configurator index 2651752..837ba51 100644 --- a/configs/airootfs/root/configurator +++ b/configs/airootfs/root/configurator @@ -128,15 +128,15 @@ user_form() { email_address=$(gum input --placeholder "Used for git authentication (hit return to skip)" --prompt.foreground="#845DF9" --prompt "Email address> ") while true; do - hostname=$(gum input --placeholder "Alphanumeric without spaces (or return for 'omarchy')" --prompt.foreground="#845DF9" --prompt "Hostname> ") + hostname=$(gum input --placeholder "Letters, digits, and dashes (or return for 'omarchy')" --prompt.foreground="#845DF9" --prompt "Hostname> ") - if [[ "$hostname" =~ ^[A-Za-z_][A-Za-z0-9_-]*\$?$ ]]; then + if [[ "$hostname" =~ ^[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?$ ]]; then break elif [[ -z $hostname ]]; then hostname="omarchy" break else - notice "Hostname must be alphanumeric using dashes or underscores but no spaces" 1 + notice "Hostname must be 1-63 letters, digits, or dashes, and cannot start or end with a dash" 1 fi done