Bootstrap: Fix script path.

This commit is contained in:
Dmitry Voronin 2024-11-15 06:32:44 +03:00
parent 23bcb97b11
commit 43283722d1
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -2,12 +2,13 @@
# Install nixos to specified drive. To be run from Live ISO.
# Usage: ./Bootstrap.sh <DRIVE> [HOST]
cfg="$(realpath .)"
target="${1}"
host="${2}"
if [[ "${target}" = "" ]]; then
printf "Usage: ./Bootstrap.sh <DRIVE> [HOST]\n"
return 2
printf "Usage: ./.Bootstrap.sh <DRIVE> [HOST]\n"
exit 2
fi
# Create partitions.
@ -37,5 +38,5 @@ if [[ "${host}" = "" ]]; then
nixos-install
else
printf "Installing ${host}...\n"
nixos-install --no-root-password --no-channel-copy --flake "${_nix_system_config}#${host}"
nixos-install --no-root-password --no-channel-copy --flake "${cfg}#${host}"
fi