Install fixes: bootstrap-install.sh (curl one-liner), nix flags in script, mkDefault hostname, doc typos/verify

Made-with: Cursor
This commit is contained in:
DannyDannyDanny 2026-03-08 18:06:54 +01:00
parent adae5e49f8
commit 52d60b9ce0
4 changed files with 44 additions and 20 deletions

21
scripts/bootstrap-install.sh Executable file
View file

@ -0,0 +1,21 @@
#!/bin/bash
# Fetch with curl and run to install NixOS (clone + run nixos-server-install.sh).
# On the live system, run only:
# curl -sL https://raw.githubusercontent.com/DannyDannyDanny/dotfiles/server-installer-usb/scripts/bootstrap-install.sh | sudo bash
#
# Optional: REPO_URL=... BRANCH=... (default repo and server-installer-usb)
set -euo pipefail
REPO_URL="${REPO_URL:-https://github.com/DannyDannyDanny/dotfiles.git}"
BRANCH="${BRANCH:-server-installer-usb}"
DEST="/tmp/dotfiles"
INSTALL_SCRIPT="$DEST/scripts/nixos-server-install.sh"
if [[ ! -f "$INSTALL_SCRIPT" ]]; then
echo "Cloning $REPO_URL ($BRANCH) to $DEST..."
nix run --extra-experimental-features "nix-command flakes" nixpkgs#git -- clone --branch "$BRANCH" "$REPO_URL" "$DEST"
fi
cd "$DEST"
[[ "$EUID" -ne 0 ]] && exec sudo bash "$INSTALL_SCRIPT"
exec bash "$INSTALL_SCRIPT"