refactor(setup): improve handling of partition prefix
This commit is contained in:
parent
969e644e74
commit
ccd0bc0a54
9 changed files with 75 additions and 75 deletions
|
@ -3,7 +3,7 @@
|
|||
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::mount][mount]]][mount]]
|
||||
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
||||
DISK=$1
|
||||
PARTITION_PREFIX=$2
|
||||
PART=$DISK$2
|
||||
|
||||
sudo mkdir -p /mnt
|
||||
# boilerplate ends here
|
||||
|
@ -21,9 +21,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}${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
|
||||
sudo mount -o subvol=root,autodefrag,noatime "${PART}2" /mnt/persist
|
||||
sudo mount -o subvol=nix,autodefrag,noatime "${PART}2" /mnt/nix
|
||||
sudo mount -o subvol=boot,autodefrag,noatime "${PART}2" /mnt/boot
|
||||
|
||||
echo "LOG: - - Mounting persistent subdirectories"
|
||||
sudo mkdir -p /mnt/home
|
||||
|
@ -31,7 +31,7 @@ sudo mount --bind /mnt/persist/home /mnt/home
|
|||
|
||||
echo "LOG: - Mounting EFI System Partition"
|
||||
sudo mkdir -p /mnt/boot/efi
|
||||
sudo mount "${DISK}${PARTITION_PREFIX}1" /mnt/boot/efi
|
||||
sudo mount "${PART}1" /mnt/boot/efi
|
||||
# mounting ends here
|
||||
# mount ends here
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue