- Move bootstrap.sh to scripts/ and add as flake app - Move build-liveusb.sh to scripts/ and add as flake app - Update usage comments to show nix run commands - Improve build-liveusb.sh with better error handling (set -euo pipefail) - Remove emojis from output messages for cleaner log output Scripts can now be run consistently via: nix run .#bootstrap -- <hostname> nix run .#build-liveusb Implements bead: nixos-configs-bli
12 lines
368 B
Bash
12 lines
368 B
Bash
#!/usr/bin/env bash
|
|
# bootstrap.sh
|
|
# Usage: nix run .#bootstrap -- <hostname>
|
|
# Or: sudo ./scripts/bootstrap.sh <hostname>
|
|
set -euo pipefail
|
|
|
|
NEW_HOSTNAME="${1:?missing hostname}"
|
|
FLAKE_URI="git+https://git.johnogle.info/johno/nixos-configs.git#${NEW_HOSTNAME}"
|
|
|
|
export NIX_CONFIG="experimental-features = nix-command flakes"
|
|
nixos-rebuild switch --flake "$FLAKE_URI"
|