diff --git a/hosts/Infini-DESKTOP/bare_install.bash b/hosts/Infini-DESKTOP/bare_install.bash deleted file mode 100755 index a16da3e..0000000 --- a/hosts/Infini-DESKTOP/bare_install.bash +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::bare_install][bare_install]] -# [[file:readme.org::bare_install][installing]] -echo "LOG: Installing NixOS" -sudo nixos-install --flake /etc/nixos#Infini-DESKTOP --no-root-password -# installing ends here -# bare_install ends here diff --git a/hosts/Infini-DESKTOP/install.bash b/hosts/Infini-DESKTOP/install.bash deleted file mode 100755 index a291583..0000000 --- a/hosts/Infini-DESKTOP/install.bash +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::install][install]] -# [[file:readme.org::mount][mount]] -# [[file:readme.org::mount][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::mount][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::mounting][mounting]] -echo "LOG: Mounting tmpfs" -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 "${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 -sudo mount --bind /mnt/persist/home /mnt/home - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${PART}1" /mnt/boot/efi -# mounting ends here -# mount ends here - -# [[file:readme.org::installing][installing]] -echo "LOG: Installing NixOS" -sudo nixos-install --flake /etc/nixos#Infini-DESKTOP --no-root-password -# installing ends here - -# [[file:readme.org::install_extra][install_extra]] -echo "LOG: Cloning configuration" -sudo chown -R infinidoge /mnt/persist/etc/nixos -git clone --no-hardlinks --progress https://gitlab.com/infinidoge/universe.git /mnt/persist/etc/nixos -# install_extra ends here - -# [[file:readme.org::cleanup][cleanup]] -echo "LOG: Unmounting all" -sudo umount -R /mnt -# cleanup ends here -# install ends here diff --git a/hosts/Infini-DESKTOP/mount.bash b/hosts/Infini-DESKTOP/mount.bash deleted file mode 100755 index 503dd8d..0000000 --- a/hosts/Infini-DESKTOP/mount.bash +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::mount][mount]] -# [[file:readme.org::mount][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::mount][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::mount][mounting]] -echo "LOG: Mounting tmpfs" -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 "${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 -sudo mount --bind /mnt/persist/home /mnt/home - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${PART}1" /mnt/boot/efi -# mounting ends here -# mount ends here diff --git a/hosts/Infini-DESKTOP/prep.bash b/hosts/Infini-DESKTOP/prep.bash deleted file mode 100755 index b934872..0000000 --- a/hosts/Infini-DESKTOP/prep.bash +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::preparation][preparation]] -# [[file:readme.org::boilerplate][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::mount_check][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::partitioning][partitioning]] -echo "LOG: Partitioning $DISK" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart ESP fat32 1MiB 512MiB -sudo parted $DISK -s -- mkpart primary btrfs 512MiB -48GiB -sudo parted $DISK -s -- mkpart primary linux-swap -48GiB 100% -sudo parted $DISK -s -- set 1 esp on -# partitioning ends here - -# [[file:readme.org::filesystems][filesystems]] -echo "LOG: Making filesystems" -echo "- Making fat32 filesystem on ${PART}1" -sudo mkfs.fat -F 32 -n boot "${PART}1" -echo "- Making btrfs filesystem on ${PART}2" -sudo mkfs.btrfs "${PART}2" -L "Infini-DESKTOP" -f -echo "- Making swap space on ${PART}3" -sudo mkswap -L swap "${PART}3" -# filesystems ends here - -# [[file:readme.org::subvolumes][subvolumes]] -echo "LOG: Making subvolumes on ${PART}2" -sudo mount "${PART}2" /mnt -sudo btrfs subvolume create /mnt/root -sudo btrfs subvolume create /mnt/root/home -sudo mkdir -p /mnt/root/etc -sudo btrfs subvolume create /mnt/root/etc/nixos -sudo btrfs subvolume create /mnt/boot -sudo btrfs subvolume create /mnt/nix -sudo btrfs subvolume create /mnt/nix/store -sudo umount /mnt -# subvolumes ends here -# preparation ends here diff --git a/hosts/Infini-DESKTOP/readme.org b/hosts/Infini-DESKTOP/readme.org deleted file mode 100644 index 8784d65..0000000 --- a/hosts/Infini-DESKTOP/readme.org +++ /dev/null @@ -1,163 +0,0 @@ -#+TITLE: Infini-DESKTOP Setup -#+AUTHOR: Infinidoge -#+OPTIONS: toc:nil -#+LaTeX_CLASS_OPTIONS: [12pt] -#+LATEX_HEADER: \usepackage[margin=1in]{geometry} - -* Partition Scheme - -| Position | Label | FS Type | Size | Type | -|----------+------------------+------------------+------+----------------------| -| 1 | =boot= | =vfat= / =fat32= | 511M | EFI System Partition | -| 2 | =Infini-DESKTOP= | =btrfs= | Rest | Root Partition | -| 3 | =swap= | =swap= | 48G | Swap Space | - -* Configuration - -Setup for my main desktop computer, using an Nvidia GPU and the =desktop= form factor from =hardware/form=. - -* Setup Scripts - -#+NAME: preparation -#+BEGIN_SRC bash :tangle prep.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> - -<> - -<> -#+END_SRC - -#+NAME: install -#+BEGIN_SRC bash :tangle install.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> - -<> -#+END_SRC - -#+NAME: mount -#+BEGIN_SRC bash :tangle mount.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> -#+END_SRC - -#+NAME: bare_install -#+BEGIN_SRC bash :tangle bare_install.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> -#+END_SRC - -** Script Boilerplate - -#+NAME: boilerplate -#+BEGIN_SRC bash -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -#+END_SRC - -#+NAME: mount_check -#+BEGIN_SRC bash -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -#+END_SRC - -** Partitioning - -#+NAME: partitioning -#+BEGIN_SRC bash -echo "LOG: Partitioning $DISK" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart ESP fat32 1MiB 512MiB -sudo parted $DISK -s -- mkpart primary btrfs 512MiB -48GiB -sudo parted $DISK -s -- mkpart primary linux-swap -48GiB 100% -sudo parted $DISK -s -- set 1 esp on -#+END_SRC - -** Making Filesystems - -#+NAME: filesystems -#+BEGIN_SRC bash -echo "LOG: Making filesystems" -echo "- Making fat32 filesystem on ${PART}1" -sudo mkfs.fat -F 32 -n boot "${PART}1" -echo "- Making btrfs filesystem on ${PART}2" -sudo mkfs.btrfs "${PART}2" -L "Infini-DESKTOP" -f -echo "- Making swap space on ${PART}3" -sudo mkswap -L swap "${PART}3" -#+END_SRC - -** Making Subvolumes - -#+NAME: subvolumes -#+BEGIN_SRC bash -echo "LOG: Making subvolumes on ${PART}2" -sudo mount "${PART}2" /mnt -sudo btrfs subvolume create /mnt/root -sudo btrfs subvolume create /mnt/root/home -sudo mkdir -p /mnt/root/etc -sudo btrfs subvolume create /mnt/root/etc/nixos -sudo btrfs subvolume create /mnt/boot -sudo btrfs subvolume create /mnt/nix -sudo btrfs subvolume create /mnt/nix/store -sudo umount /mnt -#+END_SRC - -** Mounting Volumes - -#+NAME: mounting -#+BEGIN_SRC bash -echo "LOG: Mounting tmpfs" -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 "${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 -sudo mount --bind /mnt/persist/home /mnt/home - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${PART}1" /mnt/boot/efi -#+END_SRC - -** Installing - -#+NAME: installing -#+BEGIN_SRC bash -echo "LOG: Installing NixOS" -sudo nixos-install --flake /etc/nixos#Infini-DESKTOP --no-root-password -#+END_SRC - -** Extra (Install) - -#+NAME: install_extra -#+BEGIN_SRC bash -echo "LOG: Cloning configuration" -sudo chown -R infinidoge /mnt/persist/etc/nixos -git clone --no-hardlinks --progress https://gitlab.com/infinidoge/universe.git /mnt/persist/etc/nixos -#+END_SRC - -** Cleanup - -#+NAME: cleanup -#+BEGIN_SRC bash -echo "LOG: Unmounting all" -sudo umount -R /mnt -#+END_SRC diff --git a/hosts/Infini-FRAMEWORK/bare_install.bash b/hosts/Infini-FRAMEWORK/bare_install.bash deleted file mode 100755 index 42af524..0000000 --- a/hosts/Infini-FRAMEWORK/bare_install.bash +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::bare_install][bare_install]] -# [[file:readme.org::bare_install][installing]] -echo "LOG: Installing NixOS" -sudo nixos-install --flake /etc/nixos#Infini-FRAMEWORK --no-root-password -# installing ends here -# bare_install ends here diff --git a/hosts/Infini-FRAMEWORK/install.bash b/hosts/Infini-FRAMEWORK/install.bash deleted file mode 100755 index bb1a965..0000000 --- a/hosts/Infini-FRAMEWORK/install.bash +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::install][install]] -# [[file:readme.org::mount][mount]] -# [[file:readme.org::mount][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::mount][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::mounting][mounting]] -echo "LOG: Mounting tmpfs" -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 "${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 -sudo mount --bind /mnt/persist/home /mnt/home - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${PART}1" /mnt/boot/efi -# mounting ends here -# mount ends here - -# [[file:readme.org::installing][installing]] -echo "LOG: Installing NixOS" -sudo nixos-install --flake /etc/nixos#Infini-FRAMEWORK --no-root-password -# installing ends here - -# [[file:readme.org::install_extra][install_extra]] -echo "LOG: Cloning configuration" -sudo chown -R infinidoge /mnt/persist/etc/nixos -git clone --no-hardlinks --progress https://gitlab.com/infinidoge/universe.git /mnt/persist/etc/nixos -# install_extra ends here - -# [[file:readme.org::cleanup][cleanup]] -echo "LOG: Unmounting all" -sudo umount -R /mnt -# cleanup ends here -# install ends here diff --git a/hosts/Infini-FRAMEWORK/mount.bash b/hosts/Infini-FRAMEWORK/mount.bash deleted file mode 100755 index 503dd8d..0000000 --- a/hosts/Infini-FRAMEWORK/mount.bash +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::mount][mount]] -# [[file:readme.org::mount][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::mount][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::mount][mounting]] -echo "LOG: Mounting tmpfs" -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 "${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 -sudo mount --bind /mnt/persist/home /mnt/home - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${PART}1" /mnt/boot/efi -# mounting ends here -# mount ends here diff --git a/hosts/Infini-FRAMEWORK/prep.bash b/hosts/Infini-FRAMEWORK/prep.bash deleted file mode 100755 index a550e4f..0000000 --- a/hosts/Infini-FRAMEWORK/prep.bash +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::preparation][preparation]] -# [[file:readme.org::boilerplate][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::mount_check][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::partitioning][partitioning]] -echo "LOG: Partitioning $DISK" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart ESP fat32 1MiB 512MiB -sudo parted $DISK -s -- mkpart primary btrfs 512MiB -24GiB -sudo parted $DISK -s -- mkpart primary linux-swap -24GiB 100% -sudo parted $DISK -s -- set 1 esp on -# partitioning ends here - -# [[file:readme.org::filesystems][filesystems]] -echo "LOG: Making filesystems" -echo "- Making fat32 filesystem on ${PART}1" -sudo mkfs.fat -F 32 -n boot "${PART}1" -echo "- Making btrfs filesystem on ${PART}2" -sudo mkfs.btrfs "${PART}2" -L "Infini-FRAMEWORK" -f -echo "- Making swap space on ${PART}3" -sudo mkswap -L swap "${PART}3" -# filesystems ends here - -# [[file:readme.org::subvolumes][subvolumes]] -echo "LOG: Making subvolumes on ${PART}2" -sudo mount "${PART}2" /mnt -sudo btrfs subvolume create /mnt/root -sudo btrfs subvolume create /mnt/root/home -sudo mkdir -p /mnt/root/etc -sudo btrfs subvolume create /mnt/root/etc/nixos -sudo btrfs subvolume create /mnt/boot -sudo btrfs subvolume create /mnt/nix -sudo btrfs subvolume create /mnt/nix/store -sudo umount /mnt -# subvolumes ends here -# preparation ends here diff --git a/hosts/Infini-FRAMEWORK/readme.org b/hosts/Infini-FRAMEWORK/readme.org deleted file mode 100644 index bbc1157..0000000 --- a/hosts/Infini-FRAMEWORK/readme.org +++ /dev/null @@ -1,173 +0,0 @@ -#+TITLE: Infini-FRAMEWORK Setup -#+AUTHOR: Infinidoge -#+OPTIONS: toc:nil -#+LaTeX_CLASS_OPTIONS: [12pt] -#+LATEX_HEADER: \usepackage[margin=1in]{geometry} - -* Partition Scheme - -| Position | Label | FS Type | Size | Type | -|----------+--------------------+------------------+------+----------------------| -| 1 | =boot= | =vfat= / =fat32= | 511M | EFI System Partition | -| 2 | =Infini-FRAMEWORK= | =btrfs= | Rest | Root Partition | -| 3 | =swap= | =swap= | 24G | Swap Space | - -* Configuration - -My main laptop, the [[https://frame.work][Framework Laptop]]. - -** Specs - -| | Component | -|---------+-----------------------------| -| CPU | 11th Gen Intel i5-1135G7 | -| GPU | Iris Xe Integrated Graphics | -| RAM | 16gb | -| Storage | 1tb SSD | - - -* Setup Scripts - -#+NAME: preparation -#+BEGIN_SRC bash :tangle prep.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> - -<> - -<> -#+END_SRC - -#+NAME: install -#+BEGIN_SRC bash :tangle install.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> - -<> -#+END_SRC - -#+NAME: mount -#+BEGIN_SRC bash :tangle mount.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> -#+END_SRC - -#+NAME: bare_install -#+BEGIN_SRC bash :tangle bare_install.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> -#+END_SRC - -** Script Boilerplate - -#+NAME: boilerplate -#+BEGIN_SRC bash -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -#+END_SRC - -#+NAME: mount_check -#+BEGIN_SRC bash -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -#+END_SRC - -** Partitioning - -#+NAME: partitioning -#+BEGIN_SRC bash -echo "LOG: Partitioning $DISK" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart ESP fat32 1MiB 512MiB -sudo parted $DISK -s -- mkpart primary btrfs 512MiB -24GiB -sudo parted $DISK -s -- mkpart primary linux-swap -24GiB 100% -sudo parted $DISK -s -- set 1 esp on -#+END_SRC - -** Making Filesystems - -#+NAME: filesystems -#+BEGIN_SRC bash -echo "LOG: Making filesystems" -echo "- Making fat32 filesystem on ${PART}1" -sudo mkfs.fat -F 32 -n boot "${PART}1" -echo "- Making btrfs filesystem on ${PART}2" -sudo mkfs.btrfs "${PART}2" -L "Infini-FRAMEWORK" -f -echo "- Making swap space on ${PART}3" -sudo mkswap -L swap "${PART}3" -#+END_SRC - -** Making Subvolumes - -#+NAME: subvolumes -#+BEGIN_SRC bash -echo "LOG: Making subvolumes on ${PART}2" -sudo mount "${PART}2" /mnt -sudo btrfs subvolume create /mnt/root -sudo btrfs subvolume create /mnt/root/home -sudo mkdir -p /mnt/root/etc -sudo btrfs subvolume create /mnt/root/etc/nixos -sudo btrfs subvolume create /mnt/boot -sudo btrfs subvolume create /mnt/nix -sudo btrfs subvolume create /mnt/nix/store -sudo umount /mnt -#+END_SRC - -** Mounting Volumes - -#+NAME: mounting -#+BEGIN_SRC bash -echo "LOG: Mounting tmpfs" -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 "${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 -sudo mount --bind /mnt/persist/home /mnt/home - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${PART}1" /mnt/boot/efi -#+END_SRC - -** Installing - -#+NAME: installing -#+BEGIN_SRC bash -echo "LOG: Installing NixOS" -sudo nixos-install --flake /etc/nixos#Infini-FRAMEWORK --no-root-password -#+END_SRC - -** Extra (Install) - -#+NAME: install_extra -#+BEGIN_SRC bash -echo "LOG: Cloning configuration" -sudo chown -R infinidoge /mnt/persist/etc/nixos -git clone --no-hardlinks --progress https://gitlab.com/infinidoge/universe.git /mnt/persist/etc/nixos -#+END_SRC - -** Cleanup - -#+NAME: cleanup -#+BEGIN_SRC bash -echo "LOG: Unmounting all" -sudo umount -R /mnt -#+END_SRC diff --git a/hosts/Infini-OPTIPLEX/bare_install.bash b/hosts/Infini-OPTIPLEX/bare_install.bash deleted file mode 100755 index 738a30e..0000000 --- a/hosts/Infini-OPTIPLEX/bare_install.bash +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::bare_install][bare_install]] -# [[file:readme.org::bare_install][installing]] -echo "LOG: Installing NixOS" -sudo nixos-install --flake /etc/nixos#Infini-OPTIPLEX --no-root-password -# installing ends here -# bare_install ends here diff --git a/hosts/Infini-OPTIPLEX/data_setup.bash b/hosts/Infini-OPTIPLEX/data_setup.bash deleted file mode 100755 index 474cf8b..0000000 --- a/hosts/Infini-OPTIPLEX/data_setup.bash +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::data_setup][data_setup]] -# [[file:readme.org::data_setup][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::data_setup][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::data_partitioning][data_partitioning]] -echo "LOG: Partitioning $DISK for data storage" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart primary btrfs 0% 100% -# data_partitioning ends here - -# [[file:readme.org::data_filesystems][data_filesystems]] -echo "LOG: Making data filesystems" -echo "- Making btrfa filesystem on ${PART}1" -sudo mkfs.btrfs "${PART}1" --csum xxhash -L "data" -f -# data_filesystems ends here - -# [[file:readme.org::data_subvolumes][data_subvolumes]] -echo "LOG: Making data subvolumes on ${PART}1" -sudo mount "${PART}1" /mnt -sudo btrfs subvolume create /mnt/root -sudo btrfs subvolume create /mnt/root/srv -sudo btrfs subvolume create /mnt/root/srv/jellyfin -# data_subvolumes ends here -# data_setup ends here diff --git a/hosts/Infini-OPTIPLEX/install.bash b/hosts/Infini-OPTIPLEX/install.bash deleted file mode 100755 index 4854867..0000000 --- a/hosts/Infini-OPTIPLEX/install.bash +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::install][install]] -# [[file:readme.org::mount][mount]] -# [[file:readme.org::mount][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::mount][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::mounting][mounting]] -echo "LOG: Mounting tmpfs" -sudo mount -t tmpfs root /mnt - -mntopts="autodefrag,noatime,compress=zstd:1" - -echo "LOG: - Mounting persistent directories" -sudo mkdir -p /mnt/persist /mnt/nix /mnt/boot /mnt/etc/ssh -sudo mount -o subvol=root,$mntopts "${PART}2" /mnt/persist -sudo mount -o subvol=nix,$mntopts "${PART}2" /mnt/nix -sudo mount -o subvol=boot,$mntopts "${PART}2" /mnt/boot -sudo mount -o subvol=root/etc/ssh,$mntopts "${PART}2" /mnt/etc/ssh - -echo "LOG: - - Mounting persistent subdirectories" -sudo mkdir -p /mnt/home -sudo mount --bind /mnt/persist/home /mnt/home - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${PART}1" /mnt/boot/efi -# mounting ends here -# mount ends here - -# [[file:readme.org::installing][installing]] -echo "LOG: Installing NixOS" -sudo nixos-install --flake /etc/nixos#Infini-OPTIPLEX --no-root-password -# installing ends here - -# [[file:readme.org::install_extra][install_extra]] -echo "LOG: Cloning configuration" -sudo chown -R infinidoge /mnt/persist/etc/nixos /mnt/persist/etc/nixos-private - -git clone --no-hardlinks --progress ssh://git@github.com/infinidoge/universe.git /mnt/persist/etc/nixos -git clone --no-hardlinks --progress ssh://git@github.com/infinidoge/universe-private.git /mnt/persist/etc/nixos-private -# install_extra ends here - -# [[file:readme.org::cleanup][cleanup]] -echo "LOG: Unmounting all" -sudo umount -R /mnt -# cleanup ends here -# install ends here diff --git a/hosts/Infini-OPTIPLEX/install_extras.bash b/hosts/Infini-OPTIPLEX/install_extras.bash deleted file mode 100755 index 598c176..0000000 --- a/hosts/Infini-OPTIPLEX/install_extras.bash +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::install_extras][install_extras]] -# [[file:readme.org::install_extras][install_extra]] -echo "LOG: Cloning configuration" -sudo chown -R infinidoge /mnt/persist/etc/nixos /mnt/persist/etc/nixos-private - -git clone --no-hardlinks --progress ssh://git@github.com/infinidoge/universe.git /mnt/persist/etc/nixos -git clone --no-hardlinks --progress ssh://git@github.com/infinidoge/universe-private.git /mnt/persist/etc/nixos-private -# install_extra ends here -# install_extras ends here diff --git a/hosts/Infini-OPTIPLEX/mount.bash b/hosts/Infini-OPTIPLEX/mount.bash deleted file mode 100755 index 84ccbcb..0000000 --- a/hosts/Infini-OPTIPLEX/mount.bash +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::mount][mount]] -# [[file:readme.org::mount][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::mount][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::mount][mounting]] -echo "LOG: Mounting tmpfs" -sudo mount -t tmpfs root /mnt - -mntopts="autodefrag,noatime,compress=zstd:1" - -echo "LOG: - Mounting persistent directories" -sudo mkdir -p /mnt/persist /mnt/nix /mnt/boot /mnt/etc/ssh -sudo mount -o subvol=root,$mntopts "${PART}2" /mnt/persist -sudo mount -o subvol=nix,$mntopts "${PART}2" /mnt/nix -sudo mount -o subvol=boot,$mntopts "${PART}2" /mnt/boot -sudo mount -o subvol=root/etc/ssh,$mntopts "${PART}2" /mnt/etc/ssh - -echo "LOG: - - Mounting persistent subdirectories" -sudo mkdir -p /mnt/home -sudo mount --bind /mnt/persist/home /mnt/home - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${PART}1" /mnt/boot/efi -# mounting ends here -# mount ends here diff --git a/hosts/Infini-OPTIPLEX/prep.bash b/hosts/Infini-OPTIPLEX/prep.bash deleted file mode 100755 index 62ca482..0000000 --- a/hosts/Infini-OPTIPLEX/prep.bash +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::preparation][preparation]] -# [[file:readme.org::boilerplate][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::mount_check][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::partitioning][partitioning]] -echo "LOG: Partitioning $DISK" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart ESP fat32 1MiB 512MiB -sudo parted $DISK -s -- mkpart primary btrfs 512MiB -12GiB -sudo parted $DISK -s -- mkpart primary linux-swap -12GiB 100% -sudo parted $DISK -s -- set 1 esp on -# partitioning ends here - -# [[file:readme.org::filesystems][filesystems]] -echo "LOG: Making filesystems" -echo "- Making fat32 filesystem on ${PART}1" -sudo mkfs.fat -F 32 -n boot "${PART}1" -echo "- Making btrfs filesystem on ${PART}2" -sudo mkfs.btrfs "${PART}2" -L "Infini-OPTIPLEX" -f -echo "- Making swap space on ${PART}3" -sudo mkswap -L swap "${PART}3" -# filesystems ends here - -# [[file:readme.org::subvolumes][subvolumes]] -echo "LOG: Making subvolumes on ${PART}2" -sudo mount "${PART}2" /mnt -sudo btrfs subvolume create /mnt/root -sudo btrfs subvolume create /mnt/root/home -sudo mkdir -p /mnt/root/etc -sudo btrfs subvolume create /mnt/root/etc/nixos -sudo btrfs subvolume create /mnt/root/etc/nixos-private -sudo btrfs subvolume create /mnt/root/etc/ssh -sudo btrfs subvolume create /mnt/boot -sudo btrfs subvolume create /mnt/nix -sudo btrfs subvolume create /mnt/nix/store -sudo umount /mnt -# subvolumes ends here -# preparation ends here diff --git a/hosts/Infini-OPTIPLEX/readme.org b/hosts/Infini-OPTIPLEX/readme.org deleted file mode 100644 index e09f8b1..0000000 --- a/hosts/Infini-OPTIPLEX/readme.org +++ /dev/null @@ -1,219 +0,0 @@ -#+TITLE: Infini-OPTIPLEX Setup -#+AUTHOR: Infinidoge -#+OPTIONS: toc:nil -#+LaTeX_CLASS_OPTIONS: [12pt] -#+LATEX_HEADER: \usepackage[margin=1in]{geometry} - -* Partition Scheme - -| Position | Label | FS Type | Size | Type | -|----------+-------------------+------------------+------+----------------------| -| 1 | =boot= | =vfat= / =fat32= | 511M | EFI System Partition | -| 2 | =Infini-OPTIPLEX= | =btrfs= | Rest | Root Partition | -| 3 | =swap= | =swap= | 24G | Swap Space | - -* Configuration - -Setup for another server hosting computer, which I keep with me at college. Using the =server= form factor from =hardware/form=. - -* Setup Scripts - -#+NAME: preparation -#+BEGIN_SRC bash :tangle prep.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> - -<> - -<> -#+END_SRC - -#+NAME: install -#+BEGIN_SRC bash :tangle install.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> - -<> -#+END_SRC - -#+NAME: mount -#+BEGIN_SRC bash :tangle mount.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> -#+END_SRC - -#+NAME: bare_install -#+BEGIN_SRC bash :tangle bare_install.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> -#+END_SRC - -#+NAME: install_extras -#+BEGIN_SRC bash :tangle install_extras.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> -#+END_SRC - -#+NAME: data_setup -#+BEGIN_SRC bash :tangle data_setup.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> - -<> - -<> -#+END_SRC - -** Script Boilerplate - -#+NAME: boilerplate -#+BEGIN_SRC bash -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -#+END_SRC - -#+NAME: mount_check -#+BEGIN_SRC bash -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -#+END_SRC - -** Partitioning - -#+NAME: partitioning -#+BEGIN_SRC bash -echo "LOG: Partitioning $DISK" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart ESP fat32 1MiB 512MiB -sudo parted $DISK -s -- mkpart primary btrfs 512MiB -12GiB -sudo parted $DISK -s -- mkpart primary linux-swap -12GiB 100% -sudo parted $DISK -s -- set 1 esp on -#+END_SRC - -** Making Filesystems - -#+NAME: filesystems -#+BEGIN_SRC bash -echo "LOG: Making filesystems" -echo "- Making fat32 filesystem on ${PART}1" -sudo mkfs.fat -F 32 -n boot "${PART}1" -echo "- Making btrfs filesystem on ${PART}2" -sudo mkfs.btrfs "${PART}2" -L "Infini-OPTIPLEX" -f -echo "- Making swap space on ${PART}3" -sudo mkswap -L swap "${PART}3" -#+END_SRC - -** Making Subvolumes - -#+NAME: subvolumes -#+BEGIN_SRC bash -echo "LOG: Making subvolumes on ${PART}2" -sudo mount "${PART}2" /mnt -sudo btrfs subvolume create /mnt/root -sudo btrfs subvolume create /mnt/root/home -sudo mkdir -p /mnt/root/etc -sudo btrfs subvolume create /mnt/root/etc/nixos -sudo btrfs subvolume create /mnt/root/etc/nixos-private -sudo btrfs subvolume create /mnt/root/etc/ssh -sudo btrfs subvolume create /mnt/boot -sudo btrfs subvolume create /mnt/nix -sudo btrfs subvolume create /mnt/nix/store -sudo umount /mnt -#+END_SRC - -** Mounting Volumes - -#+NAME: mounting -#+BEGIN_SRC bash -echo "LOG: Mounting tmpfs" -sudo mount -t tmpfs root /mnt - -mntopts="autodefrag,noatime,compress=zstd:1" - -echo "LOG: - Mounting persistent directories" -sudo mkdir -p /mnt/persist /mnt/nix /mnt/boot /mnt/etc/ssh -sudo mount -o subvol=root,$mntopts "${PART}2" /mnt/persist -sudo mount -o subvol=nix,$mntopts "${PART}2" /mnt/nix -sudo mount -o subvol=boot,$mntopts "${PART}2" /mnt/boot -sudo mount -o subvol=root/etc/ssh,$mntopts "${PART}2" /mnt/etc/ssh - -echo "LOG: - - Mounting persistent subdirectories" -sudo mkdir -p /mnt/home -sudo mount --bind /mnt/persist/home /mnt/home - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${PART}1" /mnt/boot/efi -#+END_SRC - -** Installing - -#+NAME: installing -#+BEGIN_SRC bash -echo "LOG: Installing NixOS" -sudo nixos-install --flake /etc/nixos#Infini-OPTIPLEX --no-root-password -#+END_SRC - -** Extra (Install) - -#+NAME: install_extra -#+BEGIN_SRC bash -echo "LOG: Cloning configuration" -sudo chown -R infinidoge /mnt/persist/etc/nixos /mnt/persist/etc/nixos-private - -git clone --no-hardlinks --progress ssh://git@github.com/infinidoge/universe.git /mnt/persist/etc/nixos -git clone --no-hardlinks --progress ssh://git@github.com/infinidoge/universe-private.git /mnt/persist/etc/nixos-private -#+END_SRC - -** Cleanup - -#+NAME: cleanup -#+BEGIN_SRC bash -echo "LOG: Unmounting all" -sudo umount -R /mnt -#+END_SRC - -** Setup Data Drive - -*** Partitioning - -#+NAME: data_partitioning -#+BEGIN_SRC bash -echo "LOG: Partitioning $DISK for data storage" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart primary btrfs 0% 100% -#+END_SRC - -*** Making Filesystems - -#+NAME: data_filesystems -#+BEGIN_SRC bash -echo "LOG: Making data filesystems" -echo "- Making btrfa filesystem on ${PART}1" -sudo mkfs.btrfs "${PART}1" --csum xxhash -L "data" -f -#+END_SRC - -*** Making Subvolumes - -#+NAME: data_subvolumes -#+BEGIN_SRC bash -echo "LOG: Making data subvolumes on ${PART}1" -sudo mount "${PART}1" /mnt -sudo btrfs subvolume create /mnt/root -sudo btrfs subvolume create /mnt/root/srv -sudo btrfs subvolume create /mnt/root/srv/jellyfin -#+END_SRC diff --git a/hosts/Infini-SERVER/bare_install.bash b/hosts/Infini-SERVER/bare_install.bash deleted file mode 100755 index ded4b7a..0000000 --- a/hosts/Infini-SERVER/bare_install.bash +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::bare_install][bare_install]] -# [[file:readme.org::bare_install][installing]] -echo "LOG: Installing NixOS" -sudo nixos-install --flake /etc/nixos#Infini-SERVER --no-root-password -# installing ends here -# bare_install ends here diff --git a/hosts/Infini-SERVER/data_setup.bash b/hosts/Infini-SERVER/data_setup.bash deleted file mode 100755 index 2efc4fc..0000000 --- a/hosts/Infini-SERVER/data_setup.bash +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::data_setup][data_setup]] -# [[file:readme.org::data_setup][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::data_setup][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::data_partitioning][data_partitioning]] -echo "LOG: Partitioning $DISK for data storage" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart primary btrfs 0% 100% -# data_partitioning ends here - -# [[file:readme.org::data_filesystems][data_filesystems]] -echo "LOG: Making data filesystems" -echo "- Making btrfa filesystem on ${PART}1" -sudo mkfs.btrfs "${PART}1" --csum xxhash -L "data" -f -# data_filesystems ends here - -# [[file:readme.org::data_subvolumes][data_subvolumes]] -echo "LOG: Making data subvolumes on ${PART}1" -sudo mount "${PART}1" /mnt -sudo btrfs subvolume create /mnt/root -sudo btrfs subvolume create /mnt/root/srv -sudo btrfs subvolume create /mnt/root/srv/minecraft -sudo btrfs subvolume create /mnt/root/srv/soft-serve -# data_subvolumes ends here -# data_setup ends here diff --git a/hosts/Infini-SERVER/install.bash b/hosts/Infini-SERVER/install.bash deleted file mode 100755 index 60063e9..0000000 --- a/hosts/Infini-SERVER/install.bash +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::install][install]] -# [[file:readme.org::mount][mount]] -# [[file:readme.org::mount][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::mount][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::mounting][mounting]] -echo "LOG: Mounting tmpfs" -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 "${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 -sudo mount --bind /mnt/persist/home /mnt/home - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${PART}1" /mnt/boot/efi -# mounting ends here -# mount ends here - -# [[file:readme.org::installing][installing]] -echo "LOG: Installing NixOS" -sudo nixos-install --flake /etc/nixos#Infini-SERVER --no-root-password -# installing ends here - -# [[file:readme.org::install_extra][install_extra]] -echo "LOG: Cloning configuration" -sudo chown -R infinidoge /mnt/persist/etc/nixos -git clone --no-hardlinks --progress https://gitlab.com/infinidoge/universe.git /mnt/persist/etc/nixos -# install_extra ends here - -# [[file:readme.org::cleanup][cleanup]] -echo "LOG: Unmounting all" -sudo umount -R /mnt -# cleanup ends here -# install ends here diff --git a/hosts/Infini-SERVER/mount.bash b/hosts/Infini-SERVER/mount.bash deleted file mode 100755 index 503dd8d..0000000 --- a/hosts/Infini-SERVER/mount.bash +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::mount][mount]] -# [[file:readme.org::mount][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::mount][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::mount][mounting]] -echo "LOG: Mounting tmpfs" -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 "${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 -sudo mount --bind /mnt/persist/home /mnt/home - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${PART}1" /mnt/boot/efi -# mounting ends here -# mount ends here diff --git a/hosts/Infini-SERVER/prep.bash b/hosts/Infini-SERVER/prep.bash deleted file mode 100755 index c479551..0000000 --- a/hosts/Infini-SERVER/prep.bash +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash -# [[file:readme.org::preparation][preparation]] -# [[file:readme.org::boilerplate][boilerplate]] -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -# boilerplate ends here - -# [[file:readme.org::mount_check][mount_check]] -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# mount_check ends here - -# [[file:readme.org::partitioning][partitioning]] -echo "LOG: Partitioning $DISK" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart ESP fat32 1MiB 512MiB -sudo parted $DISK -s -- mkpart primary btrfs 512MiB -24GiB -sudo parted $DISK -s -- mkpart primary linux-swap -24GiB 100% -sudo parted $DISK -s -- set 1 esp on -# partitioning ends here - -# [[file:readme.org::filesystems][filesystems]] -echo "LOG: Making filesystems" -echo "- Making fat32 filesystem on ${PART}1" -sudo mkfs.fat -F 32 -n boot "${PART}1" -echo "- Making btrfs filesystem on ${PART}2" -sudo mkfs.btrfs "${PART}2" -L "Infini-SERVER" -f -echo "- Making swap space on ${PART}3" -sudo mkswap -L swap "${PART}3" -# filesystems ends here - -# [[file:readme.org::subvolumes][subvolumes]] -echo "LOG: Making subvolumes on ${PART}2" -sudo mount "${PART}2" /mnt -sudo btrfs subvolume create /mnt/root -sudo btrfs subvolume create /mnt/root/home -sudo mkdir -p /mnt/root/etc -sudo btrfs subvolume create /mnt/root/etc/nixos -sudo btrfs subvolume create /mnt/boot -sudo btrfs subvolume create /mnt/nix -sudo btrfs subvolume create /mnt/nix/store -sudo umount /mnt -# subvolumes ends here -# preparation ends here diff --git a/hosts/Infini-SERVER/readme.org b/hosts/Infini-SERVER/readme.org deleted file mode 100644 index 9c5a329..0000000 --- a/hosts/Infini-SERVER/readme.org +++ /dev/null @@ -1,228 +0,0 @@ -#+TITLE: Infini-SERVER Setup -#+AUTHOR: Infinidoge -#+OPTIONS: toc:nil -#+LaTeX_CLASS_OPTIONS: [12pt] -#+LATEX_HEADER: \usepackage[margin=1in]{geometry} - -* Partition Scheme - -| Position | Label | FS Type | Size | Type | -|----------+-----------------+------------------+------+----------------------| -| 1 | =boot= | =vfat= / =fat32= | 511M | EFI System Partition | -| 2 | =Infini-SERVER= | =btrfs= | Rest | Root Partition | -| 3 | =swap= | =swap= | 24G | Swap Space | - -* Configuration - -Setup for my main server hosting computer, using an Nvidia GPU and the =server= form factor from =hardware/form=. - -* Setup Scripts - -#+NAME: preparation -#+BEGIN_SRC bash :tangle prep.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> - -<> - -<> -#+END_SRC - -#+NAME: install -#+BEGIN_SRC bash :tangle install.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> - -<> -#+END_SRC - -#+NAME: mount -#+BEGIN_SRC bash :tangle mount.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> -#+END_SRC - -#+NAME: bare_install -#+BEGIN_SRC bash :tangle bare_install.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> -#+END_SRC - -#+NAME: data_setup -#+BEGIN_SRC bash :tangle data_setup.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb -<> - -<> - -<> - -<> - -<> -#+END_SRC - -** Script Boilerplate - -#+NAME: boilerplate -#+BEGIN_SRC bash -DISK=$1 -PART=$DISK$2 - -sudo mkdir -p /mnt -#+END_SRC - -#+NAME: mount_check -#+BEGIN_SRC bash -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -#+END_SRC - -** Partitioning - -#+NAME: partitioning -#+BEGIN_SRC bash -echo "LOG: Partitioning $DISK" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart ESP fat32 1MiB 512MiB -sudo parted $DISK -s -- mkpart primary btrfs 512MiB -24GiB -sudo parted $DISK -s -- mkpart primary linux-swap -24GiB 100% -sudo parted $DISK -s -- set 1 esp on -#+END_SRC - -** Making Filesystems - -#+NAME: filesystems -#+BEGIN_SRC bash -echo "LOG: Making filesystems" -echo "- Making fat32 filesystem on ${PART}1" -sudo mkfs.fat -F 32 -n boot "${PART}1" -echo "- Making btrfs filesystem on ${PART}2" -sudo mkfs.btrfs "${PART}2" -L "Infini-SERVER" -f -echo "- Making swap space on ${PART}3" -sudo mkswap -L swap "${PART}3" -#+END_SRC - -** Making Subvolumes - -#+NAME: subvolumes -#+BEGIN_SRC bash -echo "LOG: Making subvolumes on ${PART}2" -sudo mount "${PART}2" /mnt -sudo btrfs subvolume create /mnt/root -sudo btrfs subvolume create /mnt/root/home -sudo mkdir -p /mnt/root/etc -sudo btrfs subvolume create /mnt/root/etc/nixos -sudo btrfs subvolume create /mnt/boot -sudo btrfs subvolume create /mnt/nix -sudo btrfs subvolume create /mnt/nix/store -sudo umount /mnt -#+END_SRC - -** Mounting Volumes - -#+NAME: mounting -#+BEGIN_SRC bash -echo "LOG: Mounting tmpfs" -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 "${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 -sudo mount --bind /mnt/persist/home /mnt/home - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${PART}1" /mnt/boot/efi -#+END_SRC - -** Installing - -#+NAME: installing -#+BEGIN_SRC bash -echo "LOG: Installing NixOS" -sudo nixos-install --flake /etc/nixos#Infini-SERVER --no-root-password -#+END_SRC - -** Extra (Install) - -#+NAME: install_extra -#+BEGIN_SRC bash -echo "LOG: Cloning configuration" -sudo chown -R infinidoge /mnt/persist/etc/nixos -git clone --no-hardlinks --progress https://gitlab.com/infinidoge/universe.git /mnt/persist/etc/nixos -#+END_SRC - -** Cleanup - -#+NAME: cleanup -#+BEGIN_SRC bash -echo "LOG: Unmounting all" -sudo umount -R /mnt -#+END_SRC - -** Setup Data Drive - -*** Partitioning - -#+NAME: data_partitioning -#+BEGIN_SRC bash -echo "LOG: Partitioning $DISK for data storage" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart primary btrfs 0% 100% -#+END_SRC - -*** Making Filesystems - -#+NAME: data_filesystems -#+BEGIN_SRC bash -echo "LOG: Making data filesystems" -echo "- Making btrfa filesystem on ${PART}1" -sudo mkfs.btrfs "${PART}1" --csum xxhash -L "data" -f -#+END_SRC - -*** Making Subvolumes - -#+NAME: data_subvolumes -#+BEGIN_SRC bash -echo "LOG: Making data subvolumes on ${PART}1" -sudo mount "${PART}1" /mnt -sudo btrfs subvolume create /mnt/root -sudo btrfs subvolume create /mnt/root/srv -sudo btrfs subvolume create /mnt/root/srv/minecraft -sudo btrfs subvolume create /mnt/root/srv/soft-serve -#+END_SRC - -** Setup Backup Drive - -*** Partitioning - -#+NAME: backup_partitioning -#+BEGIN_SRC bash -echo "LOG: Partitioning $DISK for backup storage" -sudo parted $DISK -- mktable gpt -sudo parted $DISK -s -- mkpart primary btrfs 0% 100% -#+END_SRC - -*** Making Filesystems - -#+NAME: backup_filesystems -#+BEGIN_SRC bash -echo "LOG: Making backup filesystems" -echo "- Making btrfa filesystem on ${PART}1" -sudo mkfs.btrfs "${PART}1" --csum xxhash -L "backup" -#+END_SRC