feat: Move bootstrap/build-liveusb scripts to flake apps
- 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
This commit was merged in pull request #23.
This commit is contained in:
11
scripts/bootstrap.sh
Normal file
11
scripts/bootstrap.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user