diff --git a/hosts/Infini-STICK/install.bash b/hosts/Infini-STICK/install.bash index 4c81a88..6e443f8 100755 --- a/hosts/Infini-STICK/install.bash +++ b/hosts/Infini-STICK/install.bash @@ -1,33 +1,5 @@ #!/usr/bin/env bash # [[file:readme.org::install][install]] -# [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::mount][mount]]][mount]] -# [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::boilerplate][boilerplate]]][boilerplate]] -DISK=$1 - -sudo mkdir -p /mnt - -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi -# boilerplate ends here - -# [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::mounting][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 "${DISK}1" /mnt/persist -sudo mount -o subvol=nix,autodefrag,noatime "${DISK}1" /mnt/nix -sudo mount -o subvol=boot,autodefrag,noatime "${DISK}1" /mnt/boot - -echo "LOG: - Mounting EFI System Partition" -sudo mkdir -p /mnt/boot/efi -sudo mount "${DISK}2" /mnt/boot/efi -# mounting ends here -# mount ends here - # [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::installing][installing]]][installing]] echo "LOG: Installing NixOS" sudo nixos-install --flake /etc/nixos#Infini-STICK --no-root-password diff --git a/hosts/Infini-STICK/mount.bash b/hosts/Infini-STICK/mount.bash index 7a27de1..aa6a1fb 100755 --- a/hosts/Infini-STICK/mount.bash +++ b/hosts/Infini-STICK/mount.bash @@ -4,12 +4,14 @@ DISK=$1 sudo mkdir -p /mnt +# boilerplate ends here +# [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::mount_check][mount_check]]][mount_check]] if mountpoint -q -- "/mnt"; then echo "ERROR: /mnt is a mounted filesystem, aborting" exit 1 fi -# boilerplate ends here +# mount_check ends here # [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::mounting][mounting]]][mounting]] echo "LOG: Mounting tmpfs" diff --git a/hosts/Infini-STICK/readme.org b/hosts/Infini-STICK/readme.org index 0d1b76d..348430f 100644 --- a/hosts/Infini-STICK/readme.org +++ b/hosts/Infini-STICK/readme.org @@ -21,6 +21,8 @@ Setup with a wide array of hardware compatibility, specifically using the =porta #+BEGIN_SRC bash :tangle setup.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb <> +<> + <> <> @@ -55,13 +57,13 @@ Setup with a wide array of hardware compatibility, specifically using the =porta #+BEGIN_SRC bash :tangle mount.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 @@ -72,7 +74,10 @@ Setup with a wide array of hardware compatibility, specifically using the =porta DISK=$1 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 diff --git a/hosts/Infini-STICK/reinstall.bash b/hosts/Infini-STICK/reinstall.bash index 6437107..5a37270 100755 --- a/hosts/Infini-STICK/reinstall.bash +++ b/hosts/Infini-STICK/reinstall.bash @@ -5,12 +5,14 @@ DISK=$1 sudo mkdir -p /mnt +# boilerplate ends here +# [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::mount_check][mount_check]]][mount_check]] if mountpoint -q -- "/mnt"; then echo "ERROR: /mnt is a mounted filesystem, aborting" exit 1 fi -# boilerplate ends here +# mount_check ends here # [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::mounting][mounting]]][mounting]] echo "LOG: Mounting tmpfs" diff --git a/hosts/Infini-STICK/setup.bash b/hosts/Infini-STICK/setup.bash index 2cc50ae..ed8a7ad 100755 --- a/hosts/Infini-STICK/setup.bash +++ b/hosts/Infini-STICK/setup.bash @@ -4,13 +4,10 @@ DISK=$1 sudo mkdir -p /mnt - -if mountpoint -q -- "/mnt"; then - echo "ERROR: /mnt is a mounted filesystem, aborting" - exit 1 -fi # boilerplate ends here + + # [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::partitioning][partitioning]]][partitioning]] echo "LOG: Partitioning $DISK" sudo parted $DISK -- mktable gpt