Updated install script to correct install procedure
Some checks failed
NixOS Configuration Check / nixos-check (push) Failing after 23s
Some checks failed
NixOS Configuration Check / nixos-check (push) Failing after 23s
This commit is contained in:
parent
015518753e
commit
702a23d79e
23
install.sh
23
install.sh
@ -4,23 +4,23 @@ DISK="/dev/sda"
|
||||
# Create a new partition table
|
||||
parted $DISK -- mklabel gpt
|
||||
|
||||
# Create the EFI partition
|
||||
parted $DISK -- mkpart ESP fat32 1MiB 512MiB
|
||||
parted $DISK -- set 1 esp on
|
||||
|
||||
# Create the root partition
|
||||
parted $DISK -- mkpart primary ext4 512MiB 100%
|
||||
|
||||
# Create the EFI partition
|
||||
parted $DISK -- mkpart ESP fat32 1MiB 512MiB
|
||||
parted $DISK -- set 2 esp on
|
||||
# Format the EFI partition
|
||||
mkfs.fat -F 32 -n BOOT ${DISK}1
|
||||
|
||||
# Format the root partition
|
||||
mkfs.ext4 ${DISK}1
|
||||
|
||||
# Format the EFI partition
|
||||
mkfs.fat -F 32 -n BOOT ${DISK}2
|
||||
mkfs.ext4 ${DISK}2
|
||||
|
||||
# Mount the partitions
|
||||
mount ${DISK}1 /mnt
|
||||
mkdir -p /mnt/boot
|
||||
mount ${DISK}2 /mnt/boot
|
||||
mount ${DISK}2 /mnt
|
||||
mkdir -p /mnt/boot/efi
|
||||
mount ${DISK}1 /mnt/boot/efi
|
||||
|
||||
# Clone the configuration repository
|
||||
mkdir -p /mnt/etc/nixos
|
||||
@ -29,6 +29,9 @@ git clone https://git.luke-else.co.uk/luke-else/nixos-config.git /mnt/etc/nixos
|
||||
# Install NixOS using the cloned configuration
|
||||
nixos-install --flake /mnt/etc/nixos#vm
|
||||
|
||||
# Ensure the bootloader is installed
|
||||
nixos-enter --root /mnt -- nixos-rebuild boot
|
||||
|
||||
# Reboot the system
|
||||
echo "Installation complete. Rebooting..."
|
||||
reboot
|
Loading…
x
Reference in New Issue
Block a user