diff --git a/scripts/format-disk.sh b/scripts/format-disk.sh deleted file mode 100755 index 5664cb4..0000000 --- a/scripts/format-disk.sh +++ /dev/null @@ -1,37 +0,0 @@ -# Print the drives and get user input -parted -l && -read -p "Which disk do you want to format?: " drive_path && -read -p "How large should the swap partition be (in GiB)?: " swap_size && -# Create partition table -parted $drive_path -- mklabel gpt && -# Create EFI partition -parted $drive_path -- mkpart ESP fat32 1MiB 512MiB && -parted $drive_path -- set 1 esp on && -# Create the main partition -parted $drive_path -- mkpart primary 512MiB 100% && - -# Encrypt the main partition -main_partition="${drive_path}2" && -cryptsetup luksFormat --type luks1 $main_partition && -cryptsetup open $main_partition cryptlvm && - -# Create the LVM groups -pvcreate /dev/mapper/cryptlvm && -vgcreate MainGroup /dev/mapper/cryptlvm && -# Create the swap volume -lvcreate -L ${swap_size}G MainGroup -n swap && -# Create the main volume -lvcreate -l 100%FREE MainGroup -n root && - -# Format the main volume with EXT4 -mkfs.ext4 -L nixos /dev/MainGroup/root && -# Enable swap -mkswap -L swap /dev/MainGroup/swap && -# Format the boot partition with FAT32 -boot_partition="${drive_path}1" && -mkfs.fat -F 32 -n BOOT $boot_partition && - -# Mount the drive -mount /dev/MainGroup/root /mnt && -mkdir -p /mnt/boot && -mount /dev/disk/by-label/BOOT /mnt/boot diff --git a/scripts/install.sh b/scripts/install.sh new file mode 100644 index 0000000..c315e9a --- /dev/null +++ b/scripts/install.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +nix-shell -p python3 +sudo python3 format-disk.py diff --git a/scripts/link-asus.sh b/scripts/link-asus.sh deleted file mode 100755 index ffd99f8..0000000 --- a/scripts/link-asus.sh +++ /dev/null @@ -1,4 +0,0 @@ -mkdir -p /mnt/etc/nixos/ - -ln -s $(pwd)/hardware/asus/configuration.nix /mnt/etc/nixos/configuration.nix - diff --git a/scripts/link-precision.sh b/scripts/link-precision.sh deleted file mode 100755 index 7796e9d..0000000 --- a/scripts/link-precision.sh +++ /dev/null @@ -1,3 +0,0 @@ -mkdir -p /mnt/etc/nixos/ - -ln -s $(pwd)/hardware/precision/configuration.nix /mnt/etc/nixos/configuration.nix diff --git a/scripts/link-vm.sh b/scripts/link-vm.sh deleted file mode 100755 index 662ed84..0000000 --- a/scripts/link-vm.sh +++ /dev/null @@ -1,5 +0,0 @@ -mkdir -p /mnt/etc/nixos/ - -ln -s $(pwd)/hardware/vm/configuration.nix /mnt/etc/nixos/configuration.nix - -