fix install script maybe

This commit is contained in:
minish 2024-12-30 23:07:00 -05:00
parent 6de69d336a
commit ea2b0efeff
1 changed files with 15 additions and 4 deletions

View File

@ -57,12 +57,23 @@ cp "$KEYDIR/host" "$dir/ssh_host_ed25519_key"
cp "$KEYDIR/host.pub" "$dir/ssh_host_ed25519_key.pub" cp "$KEYDIR/host.pub" "$dir/ssh_host_ed25519_key.pub"
chmod 600 "$dir/ssh_host_ed25519_key" chmod 600 "$dir/ssh_host_ed25519_key"
# run disko-install # run disko
ROOT_MNT="/mnt"
cp "$KEYDIR/luks-pw" "/tmp/luks-pw" cp "$KEYDIR/luks-pw" "/tmp/luks-pw"
disko-install \ disko \
--extra-files "$temp" "/" \ --mode disko \
--flake .#$NAME \ --flake .#$NAME \
--write-efi-boot-entries --root-mountpoint $ROOT_MNT
# copy extra files into mountpoint
cp -r "$temp" "$ROOT_MNT/"
# run nixos-install
nixos-install \
--no-channel-copy \
--no-root-password \
--root "$ROOTMNT" \
--flake .#$NAME
echo -e "Finished install.\n" \ echo -e "Finished install.\n" \
"Make sure to delete the SSH host keys from here if you are done with them." "Make sure to delete the SSH host keys from here if you are done with them."