install.sh: fix drive selection

This commit is contained in:
Daniella / Tove 2024-10-24 21:16:40 +02:00
parent ba88fc7a29
commit 05ce120f9a

View file

@ -28,10 +28,10 @@ a
w w
EOF EOF
if [ $? != 0 ] ; then exit 1 ; fi if [ $? != 0 ] ; then exit 1 ; fi
echo "> created DOS partition table on $drive with one bootable partition." echo "> created DOS partition table on /dev/$drive with one bootable partition."
sudo mkfs.ext4 $drive*1 || exit 1 # /dev/sda 1 or /dev/nvme0n1 p1 => *1 instead of just 1 sudo mkfs.ext4 /dev/$drive*1 || exit 1 # /dev/sda 1 or /dev/nvme0n1 p1 => *1 instead of just 1
echo "> formatted." echo "> formatted."
sudo mount $drive*1 /mnt || exit 1 sudo mount /dev/$drive*1 /mnt || exit 1
echo "> mounted." echo "> mounted."
echo "> generating config" echo "> generating config"
sudo nixos-generate-config --root /mnt sudo nixos-generate-config --root /mnt