feat(Infini-DESKTOP,Infini-SERVER): improve install scripts

This commit is contained in:
Infinidoge 2022-02-15 12:06:55 -05:00
parent d8e5f5bf33
commit 9327f0e30a
8 changed files with 36 additions and 32 deletions

View file

@ -61,6 +61,7 @@ Setup for my main server hosting computer, using an Nvidia GPU and the =server=
#+NAME: boilerplate
#+BEGIN_SRC bash
DISK=$1
PARTITION_PREFIX=$2
sudo mkdir -p /mnt
#+END_SRC
@ -90,20 +91,20 @@ sudo parted $DISK -s -- set 1 esp on
#+NAME: filesystems
#+BEGIN_SRC bash
echo "LOG: Making filesystems"
echo "- Making fat32 filesystem on ${DISK}1"
sudo mkfs.fat -F 32 -n boot "${DISK}1"
echo "- Making btrfs filesystem on ${DISK}2"
sudo mkfs.btrfs "${DISK}2" -L "Infini-SERVER" -f
echo "- Making swap space on ${DISK}3"
sudo mkswap -L swap "${DISK}3"
echo "- Making fat32 filesystem on ${DISK}${PARTITION_PREFIX}1"
sudo mkfs.fat -F 32 -n boot "${DISK}${PARTITION_PREFIX}1"
echo "- Making btrfs filesystem on ${DISK}${PARTITION_PREFIX}2"
sudo mkfs.btrfs "${DISK}${PARTITION_PREFIX}2" -L "Infini-SERVER" -f
echo "- Making swap space on ${DISK}${PARTITION_PREFIX}3"
sudo mkswap -L swap "${DISK}${PARTITION_PREFIX}3"
#+END_SRC
** Making Subvolumes
#+NAME: subvolumes
#+BEGIN_SRC bash
echo "LOG: Making subvolumes on ${DISK}2"
sudo mount "${DISK}2" /mnt
echo "LOG: Making subvolumes on ${DISK}${PARTITION_PREFIX}2"
sudo mount "${DISK}${PARTITION_PREFIX}2" /mnt
sudo btrfs subvolume create /mnt/root
sudo btrfs subvolume create /mnt/root/home
sudo mkdir -p /mnt/root/etc
@ -123,9 +124,9 @@ sudo mount -t tmpfs root /mnt
echo "LOG: - Mounting persistent directories"
sudo mkdir -p /mnt/persist /mnt/nix /mnt/boot
sudo mount -o subvol=root,autodefrag,noatime "${DISK}2" /mnt/persist
sudo mount -o subvol=nix,autodefrag,noatime "${DISK}2" /mnt/nix
sudo mount -o subvol=boot,autodefrag,noatime "${DISK}2" /mnt/boot
sudo mount -o subvol=root,autodefrag,noatime "${DISK}${PARTITION_PREFIX}2" /mnt/persist
sudo mount -o subvol=nix,autodefrag,noatime "${DISK}${PARTITION_PREFIX}2" /mnt/nix
sudo mount -o subvol=boot,autodefrag,noatime "${DISK}${PARTITION_PREFIX}2" /mnt/boot
echo "LOG: - - Mounting persistent subdirectories"
sudo mkdir -p /mnt/home
@ -133,7 +134,7 @@ sudo mount --bind /mnt/persist/home /mnt/home
echo "LOG: - Mounting EFI System Partition"
sudo mkdir -p /mnt/boot/efi
sudo mount "${DISK}1" /mnt/boot/efi
sudo mount "${DISK}${PARTITION_PREFIX}1" /mnt/boot/efi
#+END_SRC
** Installing