feat(Infini-DESKTOP,Infini-SERVER): improve install scripts
This commit is contained in:
parent
d8e5f5bf33
commit
9327f0e30a
8 changed files with 36 additions and 32 deletions
|
@ -3,7 +3,7 @@
|
||||||
# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::mount][mount]]][mount]]
|
# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::mount][mount]]][mount]]
|
||||||
# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
||||||
DISK=$1
|
DISK=$1
|
||||||
PARTITION_PREFIX="p"
|
PARTITION_PREFIX=$2
|
||||||
|
|
||||||
sudo mkdir -p /mnt
|
sudo mkdir -p /mnt
|
||||||
# boilerplate ends here
|
# boilerplate ends here
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# [[file:readme.org::mount][mount]]
|
# [[file:readme.org::mount][mount]]
|
||||||
# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
||||||
DISK=$1
|
DISK=$1
|
||||||
PARTITION_PREFIX="p"
|
PARTITION_PREFIX=$2
|
||||||
|
|
||||||
sudo mkdir -p /mnt
|
sudo mkdir -p /mnt
|
||||||
# boilerplate ends here
|
# boilerplate ends here
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# [[file:readme.org::preparation][preparation]]
|
# [[file:readme.org::preparation][preparation]]
|
||||||
# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
||||||
DISK=$1
|
DISK=$1
|
||||||
PARTITION_PREFIX="p"
|
PARTITION_PREFIX=$2
|
||||||
|
|
||||||
sudo mkdir -p /mnt
|
sudo mkdir -p /mnt
|
||||||
# boilerplate ends here
|
# boilerplate ends here
|
||||||
|
|
|
@ -61,7 +61,7 @@ Setup for my main desktop computer, using an Nvidia GPU and the =desktop= form f
|
||||||
#+NAME: boilerplate
|
#+NAME: boilerplate
|
||||||
#+BEGIN_SRC bash
|
#+BEGIN_SRC bash
|
||||||
DISK=$1
|
DISK=$1
|
||||||
PARTITION_PREFIX="p"
|
PARTITION_PREFIX=$2
|
||||||
|
|
||||||
sudo mkdir -p /mnt
|
sudo mkdir -p /mnt
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::mount][mount]]][mount]]
|
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::mount][mount]]][mount]]
|
||||||
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
||||||
DISK=$1
|
DISK=$1
|
||||||
|
PARTITION_PREFIX=$2
|
||||||
|
|
||||||
sudo mkdir -p /mnt
|
sudo mkdir -p /mnt
|
||||||
# boilerplate ends here
|
# boilerplate ends here
|
||||||
|
@ -20,9 +21,9 @@ sudo mount -t tmpfs root /mnt
|
||||||
|
|
||||||
echo "LOG: - Mounting persistent directories"
|
echo "LOG: - Mounting persistent directories"
|
||||||
sudo mkdir -p /mnt/persist /mnt/nix /mnt/boot
|
sudo mkdir -p /mnt/persist /mnt/nix /mnt/boot
|
||||||
sudo mount -o subvol=root,autodefrag,noatime "${DISK}2" /mnt/persist
|
sudo mount -o subvol=root,autodefrag,noatime "${DISK}${PARTITION_PREFIX}2" /mnt/persist
|
||||||
sudo mount -o subvol=nix,autodefrag,noatime "${DISK}2" /mnt/nix
|
sudo mount -o subvol=nix,autodefrag,noatime "${DISK}${PARTITION_PREFIX}2" /mnt/nix
|
||||||
sudo mount -o subvol=boot,autodefrag,noatime "${DISK}2" /mnt/boot
|
sudo mount -o subvol=boot,autodefrag,noatime "${DISK}${PARTITION_PREFIX}2" /mnt/boot
|
||||||
|
|
||||||
echo "LOG: - - Mounting persistent subdirectories"
|
echo "LOG: - - Mounting persistent subdirectories"
|
||||||
sudo mkdir -p /mnt/home
|
sudo mkdir -p /mnt/home
|
||||||
|
@ -30,7 +31,7 @@ sudo mount --bind /mnt/persist/home /mnt/home
|
||||||
|
|
||||||
echo "LOG: - Mounting EFI System Partition"
|
echo "LOG: - Mounting EFI System Partition"
|
||||||
sudo mkdir -p /mnt/boot/efi
|
sudo mkdir -p /mnt/boot/efi
|
||||||
sudo mount "${DISK}1" /mnt/boot/efi
|
sudo mount "${DISK}${PARTITION_PREFIX}1" /mnt/boot/efi
|
||||||
# mounting ends here
|
# mounting ends here
|
||||||
# mount ends here
|
# mount ends here
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
# [[file:readme.org::mount][mount]]
|
# [[file:readme.org::mount][mount]]
|
||||||
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
||||||
DISK=$1
|
DISK=$1
|
||||||
|
PARTITION_PREFIX=$2
|
||||||
|
|
||||||
sudo mkdir -p /mnt
|
sudo mkdir -p /mnt
|
||||||
# boilerplate ends here
|
# boilerplate ends here
|
||||||
|
@ -19,9 +20,9 @@ sudo mount -t tmpfs root /mnt
|
||||||
|
|
||||||
echo "LOG: - Mounting persistent directories"
|
echo "LOG: - Mounting persistent directories"
|
||||||
sudo mkdir -p /mnt/persist /mnt/nix /mnt/boot
|
sudo mkdir -p /mnt/persist /mnt/nix /mnt/boot
|
||||||
sudo mount -o subvol=root,autodefrag,noatime "${DISK}2" /mnt/persist
|
sudo mount -o subvol=root,autodefrag,noatime "${DISK}${PARTITION_PREFIX}2" /mnt/persist
|
||||||
sudo mount -o subvol=nix,autodefrag,noatime "${DISK}2" /mnt/nix
|
sudo mount -o subvol=nix,autodefrag,noatime "${DISK}${PARTITION_PREFIX}2" /mnt/nix
|
||||||
sudo mount -o subvol=boot,autodefrag,noatime "${DISK}2" /mnt/boot
|
sudo mount -o subvol=boot,autodefrag,noatime "${DISK}${PARTITION_PREFIX}2" /mnt/boot
|
||||||
|
|
||||||
echo "LOG: - - Mounting persistent subdirectories"
|
echo "LOG: - - Mounting persistent subdirectories"
|
||||||
sudo mkdir -p /mnt/home
|
sudo mkdir -p /mnt/home
|
||||||
|
@ -29,6 +30,6 @@ sudo mount --bind /mnt/persist/home /mnt/home
|
||||||
|
|
||||||
echo "LOG: - Mounting EFI System Partition"
|
echo "LOG: - Mounting EFI System Partition"
|
||||||
sudo mkdir -p /mnt/boot/efi
|
sudo mkdir -p /mnt/boot/efi
|
||||||
sudo mount "${DISK}1" /mnt/boot/efi
|
sudo mount "${DISK}${PARTITION_PREFIX}1" /mnt/boot/efi
|
||||||
# mounting ends here
|
# mounting ends here
|
||||||
# mount ends here
|
# mount ends here
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
# [[file:readme.org::preparation][preparation]]
|
# [[file:readme.org::preparation][preparation]]
|
||||||
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
||||||
DISK=$1
|
DISK=$1
|
||||||
|
PARTITION_PREFIX=$2
|
||||||
|
|
||||||
sudo mkdir -p /mnt
|
sudo mkdir -p /mnt
|
||||||
# boilerplate ends here
|
# boilerplate ends here
|
||||||
|
@ -19,17 +20,17 @@ sudo parted $DISK -s -- set 1 esp on
|
||||||
|
|
||||||
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::filesystems][filesystems]]][filesystems]]
|
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::filesystems][filesystems]]][filesystems]]
|
||||||
echo "LOG: Making filesystems"
|
echo "LOG: Making filesystems"
|
||||||
echo "- Making fat32 filesystem on ${DISK}1"
|
echo "- Making fat32 filesystem on ${DISK}${PARTITION_PREFIX}1"
|
||||||
sudo mkfs.fat -F 32 -n boot "${DISK}1"
|
sudo mkfs.fat -F 32 -n boot "${DISK}${PARTITION_PREFIX}1"
|
||||||
echo "- Making btrfs filesystem on ${DISK}2"
|
echo "- Making btrfs filesystem on ${DISK}${PARTITION_PREFIX}2"
|
||||||
sudo mkfs.btrfs "${DISK}2" -L "Infini-SERVER" -f
|
sudo mkfs.btrfs "${DISK}${PARTITION_PREFIX}2" -L "Infini-SERVER" -f
|
||||||
echo "- Making swap space on ${DISK}3"
|
echo "- Making swap space on ${DISK}${PARTITION_PREFIX}3"
|
||||||
sudo mkswap -L swap "${DISK}3"
|
sudo mkswap -L swap "${DISK}${PARTITION_PREFIX}3"
|
||||||
# filesystems ends here
|
# filesystems ends here
|
||||||
|
|
||||||
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::subvolumes][subvolumes]]][subvolumes]]
|
# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::subvolumes][subvolumes]]][subvolumes]]
|
||||||
echo "LOG: Making subvolumes on ${DISK}2"
|
echo "LOG: Making subvolumes on ${DISK}${PARTITION_PREFIX}2"
|
||||||
sudo mount "${DISK}2" /mnt
|
sudo mount "${DISK}${PARTITION_PREFIX}2" /mnt
|
||||||
sudo btrfs subvolume create /mnt/root
|
sudo btrfs subvolume create /mnt/root
|
||||||
sudo btrfs subvolume create /mnt/root/home
|
sudo btrfs subvolume create /mnt/root/home
|
||||||
sudo mkdir -p /mnt/root/etc
|
sudo mkdir -p /mnt/root/etc
|
||||||
|
|
|
@ -61,6 +61,7 @@ Setup for my main server hosting computer, using an Nvidia GPU and the =server=
|
||||||
#+NAME: boilerplate
|
#+NAME: boilerplate
|
||||||
#+BEGIN_SRC bash
|
#+BEGIN_SRC bash
|
||||||
DISK=$1
|
DISK=$1
|
||||||
|
PARTITION_PREFIX=$2
|
||||||
|
|
||||||
sudo mkdir -p /mnt
|
sudo mkdir -p /mnt
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
@ -90,20 +91,20 @@ sudo parted $DISK -s -- set 1 esp on
|
||||||
#+NAME: filesystems
|
#+NAME: filesystems
|
||||||
#+BEGIN_SRC bash
|
#+BEGIN_SRC bash
|
||||||
echo "LOG: Making filesystems"
|
echo "LOG: Making filesystems"
|
||||||
echo "- Making fat32 filesystem on ${DISK}1"
|
echo "- Making fat32 filesystem on ${DISK}${PARTITION_PREFIX}1"
|
||||||
sudo mkfs.fat -F 32 -n boot "${DISK}1"
|
sudo mkfs.fat -F 32 -n boot "${DISK}${PARTITION_PREFIX}1"
|
||||||
echo "- Making btrfs filesystem on ${DISK}2"
|
echo "- Making btrfs filesystem on ${DISK}${PARTITION_PREFIX}2"
|
||||||
sudo mkfs.btrfs "${DISK}2" -L "Infini-SERVER" -f
|
sudo mkfs.btrfs "${DISK}${PARTITION_PREFIX}2" -L "Infini-SERVER" -f
|
||||||
echo "- Making swap space on ${DISK}3"
|
echo "- Making swap space on ${DISK}${PARTITION_PREFIX}3"
|
||||||
sudo mkswap -L swap "${DISK}3"
|
sudo mkswap -L swap "${DISK}${PARTITION_PREFIX}3"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Making Subvolumes
|
** Making Subvolumes
|
||||||
|
|
||||||
#+NAME: subvolumes
|
#+NAME: subvolumes
|
||||||
#+BEGIN_SRC bash
|
#+BEGIN_SRC bash
|
||||||
echo "LOG: Making subvolumes on ${DISK}2"
|
echo "LOG: Making subvolumes on ${DISK}${PARTITION_PREFIX}2"
|
||||||
sudo mount "${DISK}2" /mnt
|
sudo mount "${DISK}${PARTITION_PREFIX}2" /mnt
|
||||||
sudo btrfs subvolume create /mnt/root
|
sudo btrfs subvolume create /mnt/root
|
||||||
sudo btrfs subvolume create /mnt/root/home
|
sudo btrfs subvolume create /mnt/root/home
|
||||||
sudo mkdir -p /mnt/root/etc
|
sudo mkdir -p /mnt/root/etc
|
||||||
|
@ -123,9 +124,9 @@ sudo mount -t tmpfs root /mnt
|
||||||
|
|
||||||
echo "LOG: - Mounting persistent directories"
|
echo "LOG: - Mounting persistent directories"
|
||||||
sudo mkdir -p /mnt/persist /mnt/nix /mnt/boot
|
sudo mkdir -p /mnt/persist /mnt/nix /mnt/boot
|
||||||
sudo mount -o subvol=root,autodefrag,noatime "${DISK}2" /mnt/persist
|
sudo mount -o subvol=root,autodefrag,noatime "${DISK}${PARTITION_PREFIX}2" /mnt/persist
|
||||||
sudo mount -o subvol=nix,autodefrag,noatime "${DISK}2" /mnt/nix
|
sudo mount -o subvol=nix,autodefrag,noatime "${DISK}${PARTITION_PREFIX}2" /mnt/nix
|
||||||
sudo mount -o subvol=boot,autodefrag,noatime "${DISK}2" /mnt/boot
|
sudo mount -o subvol=boot,autodefrag,noatime "${DISK}${PARTITION_PREFIX}2" /mnt/boot
|
||||||
|
|
||||||
echo "LOG: - - Mounting persistent subdirectories"
|
echo "LOG: - - Mounting persistent subdirectories"
|
||||||
sudo mkdir -p /mnt/home
|
sudo mkdir -p /mnt/home
|
||||||
|
@ -133,7 +134,7 @@ sudo mount --bind /mnt/persist/home /mnt/home
|
||||||
|
|
||||||
echo "LOG: - Mounting EFI System Partition"
|
echo "LOG: - Mounting EFI System Partition"
|
||||||
sudo mkdir -p /mnt/boot/efi
|
sudo mkdir -p /mnt/boot/efi
|
||||||
sudo mount "${DISK}1" /mnt/boot/efi
|
sudo mount "${DISK}${PARTITION_PREFIX}1" /mnt/boot/efi
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Installing
|
** Installing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue