mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-10-09 11:11:49 -04:00
clean-install: prompt for host
This commit is contained in:
parent
e27e678f3e
commit
1fd64d4404
|
@ -51,7 +51,7 @@ Substitute `$HOSTNAME` for whichever hostname you have chosen. Reboot to apply t
|
|||
### Installing from Live USB
|
||||
> :red_circle: **This will erase your computer's disk** as specified by the host configuration, installing a fresh copy of NixOS. Backup first!
|
||||
|
||||
If you want to install NixOS from this flake, run the following commands, ideally from a NixOS live environment, substituting `$HOSTNAME` with a NixOS configuration specified in `flake.nix`.
|
||||
If you want to install NixOS from this flake, run the following commands, ideally from a NixOS live environment, providing the hostname associated with a NixOS configuration specified in `flake.nix`.
|
||||
```console
|
||||
sudo nix --experimental-features "nix-command flakes" run github:alyraffauf/nixcfg -- $HOSTNAME
|
||||
sudo nix --experimental-features "nix-command flakes" run github:alyraffauf/nixcfg
|
||||
```
|
|
@ -1,11 +1,7 @@
|
|||
# Check if an argument is provided
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Error: Please provide a valid hostname as an argument."
|
||||
exit 1
|
||||
fi
|
||||
read -p "Which host are you installing? " HOST
|
||||
|
||||
HOST=$1
|
||||
FLAKE=github:alyraffauf/nixcfg#$HOST
|
||||
echo "Installing from $FLAKE"
|
||||
|
||||
echo "Warning: Running this script will wipe the currently installed system."
|
||||
read -p "Do you want to continue? (y/n): " answer
|
||||
|
|
Loading…
Reference in a new issue