From 8ffe22d7f86648d87ef2445b2db2642c075bebcf Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Tue, 26 Sep 2023 16:55:23 -0400 Subject: [PATCH] hosts/*: retangle setup files --- hosts/Infini-DESKTOP/bare_install.bash | 2 +- hosts/Infini-DESKTOP/install.bash | 14 +++++++------- hosts/Infini-DESKTOP/mount.bash | 6 +++--- hosts/Infini-DESKTOP/prep.bash | 10 +++++----- hosts/Infini-FRAMEWORK/bare_install.bash | 2 +- hosts/Infini-FRAMEWORK/install.bash | 14 +++++++------- hosts/Infini-FRAMEWORK/mount.bash | 6 +++--- hosts/Infini-FRAMEWORK/prep.bash | 10 +++++----- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/hosts/Infini-DESKTOP/bare_install.bash b/hosts/Infini-DESKTOP/bare_install.bash index 0428be2..a16da3e 100755 --- a/hosts/Infini-DESKTOP/bare_install.bash +++ b/hosts/Infini-DESKTOP/bare_install.bash @@ -1,6 +1,6 @@ #!/usr/bin/env bash # [[file:readme.org::bare_install][bare_install]] -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::installing][installing]]][installing]] +# [[file:readme.org::bare_install][installing]] echo "LOG: Installing NixOS" sudo nixos-install --flake /etc/nixos#Infini-DESKTOP --no-root-password # installing ends here diff --git a/hosts/Infini-DESKTOP/install.bash b/hosts/Infini-DESKTOP/install.bash index fa3f5fb..5c0fc65 100755 --- a/hosts/Infini-DESKTOP/install.bash +++ b/hosts/Infini-DESKTOP/install.bash @@ -1,21 +1,21 @@ #!/usr/bin/env bash # [[file:readme.org::install][install]] -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::mount][mount]]][mount]] -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::boilerplate][boilerplate]]][boilerplate]] +# [[file:readme.org::mount][mount]] +# [[file:readme.org::mount][boilerplate]] DISK=$1 PART=$DISK$2 sudo mkdir -p /mnt # boilerplate ends here -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::mount_check][mount_check]]][mount_check]] +# [[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:/etc/nixos/hosts/Infini-DESKTOP/readme.org::mounting][mounting]]][mounting]] +# [[file:readme.org::mounting][mounting]] echo "LOG: Mounting tmpfs" sudo mount -t tmpfs root /mnt @@ -35,12 +35,12 @@ sudo mount "${PART}1" /mnt/boot/efi # mounting ends here # mount ends here -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::installing][installing]]][installing]] +# [[file:readme.org::installing][installing]] echo "LOG: Installing NixOS" sudo nixos-install --flake /etc/nixos#Infini-DESKTOP --no-root-password # installing ends here -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::install_extra][install_extra]]][install_extra]] +# [[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 @@ -51,7 +51,7 @@ git clone --no-hardlinks --progress --depth 1 https://github.com/doomemacs/doome HOME=/mnt/persist/home/infinidoge /mnt/persist/home/infinidoge/.config/emacs/bin/doom -y install --no-config # install_extra ends here -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::cleanup][cleanup]]][cleanup]] +# [[file:readme.org::cleanup][cleanup]] echo "LOG: Unmounting all" sudo umount -R /mnt # cleanup ends here diff --git a/hosts/Infini-DESKTOP/mount.bash b/hosts/Infini-DESKTOP/mount.bash index db23d31..503dd8d 100755 --- a/hosts/Infini-DESKTOP/mount.bash +++ b/hosts/Infini-DESKTOP/mount.bash @@ -1,20 +1,20 @@ #!/usr/bin/env bash # [[file:readme.org::mount][mount]] -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::boilerplate][boilerplate]]][boilerplate]] +# [[file:readme.org::mount][boilerplate]] DISK=$1 PART=$DISK$2 sudo mkdir -p /mnt # boilerplate ends here -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::mount_check][mount_check]]][mount_check]] +# [[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:/etc/nixos/hosts/Infini-DESKTOP/readme.org::mounting][mounting]]][mounting]] +# [[file:readme.org::mount][mounting]] echo "LOG: Mounting tmpfs" sudo mount -t tmpfs root /mnt diff --git a/hosts/Infini-DESKTOP/prep.bash b/hosts/Infini-DESKTOP/prep.bash index f950119..b934872 100755 --- a/hosts/Infini-DESKTOP/prep.bash +++ b/hosts/Infini-DESKTOP/prep.bash @@ -1,20 +1,20 @@ #!/usr/bin/env bash # [[file:readme.org::preparation][preparation]] -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::boilerplate][boilerplate]]][boilerplate]] +# [[file:readme.org::boilerplate][boilerplate]] DISK=$1 PART=$DISK$2 sudo mkdir -p /mnt # boilerplate ends here -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::mount_check][mount_check]]][mount_check]] +# [[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:/etc/nixos/hosts/Infini-DESKTOP/readme.org::partitioning][partitioning]]][partitioning]] +# [[file:readme.org::partitioning][partitioning]] echo "LOG: Partitioning $DISK" sudo parted $DISK -- mktable gpt sudo parted $DISK -s -- mkpart ESP fat32 1MiB 512MiB @@ -23,7 +23,7 @@ sudo parted $DISK -s -- mkpart primary linux-swap -48GiB 100% sudo parted $DISK -s -- set 1 esp on # partitioning ends here -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::filesystems][filesystems]]][filesystems]] +# [[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" @@ -33,7 +33,7 @@ echo "- Making swap space on ${PART}3" sudo mkswap -L swap "${PART}3" # filesystems ends here -# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::subvolumes][subvolumes]]][subvolumes]] +# [[file:readme.org::subvolumes][subvolumes]] echo "LOG: Making subvolumes on ${PART}2" sudo mount "${PART}2" /mnt sudo btrfs subvolume create /mnt/root diff --git a/hosts/Infini-FRAMEWORK/bare_install.bash b/hosts/Infini-FRAMEWORK/bare_install.bash index 89bb6aa..42af524 100755 --- a/hosts/Infini-FRAMEWORK/bare_install.bash +++ b/hosts/Infini-FRAMEWORK/bare_install.bash @@ -1,6 +1,6 @@ #!/usr/bin/env bash # [[file:readme.org::bare_install][bare_install]] -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::installing][installing]]][installing]] +# [[file:readme.org::bare_install][installing]] echo "LOG: Installing NixOS" sudo nixos-install --flake /etc/nixos#Infini-FRAMEWORK --no-root-password # installing ends here diff --git a/hosts/Infini-FRAMEWORK/install.bash b/hosts/Infini-FRAMEWORK/install.bash index c702052..e659fcc 100755 --- a/hosts/Infini-FRAMEWORK/install.bash +++ b/hosts/Infini-FRAMEWORK/install.bash @@ -1,21 +1,21 @@ #!/usr/bin/env bash # [[file:readme.org::install][install]] -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::mount][mount]]][mount]] -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::boilerplate][boilerplate]]][boilerplate]] +# [[file:readme.org::mount][mount]] +# [[file:readme.org::mount][boilerplate]] DISK=$1 PART=$DISK$2 sudo mkdir -p /mnt # boilerplate ends here -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::mount_check][mount_check]]][mount_check]] +# [[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:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::mounting][mounting]]][mounting]] +# [[file:readme.org::mounting][mounting]] echo "LOG: Mounting tmpfs" sudo mount -t tmpfs root /mnt @@ -35,12 +35,12 @@ sudo mount "${PART}1" /mnt/boot/efi # mounting ends here # mount ends here -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::installing][installing]]][installing]] +# [[file:readme.org::installing][installing]] echo "LOG: Installing NixOS" sudo nixos-install --flake /etc/nixos#Infini-FRAMEWORK --no-root-password # installing ends here -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::install_extra][install_extra]]][install_extra]] +# [[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 @@ -51,7 +51,7 @@ git clone --no-hardlinks --progress --depth 1 https://github.com/doomemacs/doome HOME=/mnt/persist/home/infinidoge /mnt/persist/home/infinidoge/.config/emacs/bin/doom -y install --no-config # install_extra ends here -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::cleanup][cleanup]]][cleanup]] +# [[file:readme.org::cleanup][cleanup]] echo "LOG: Unmounting all" sudo umount -R /mnt # cleanup ends here diff --git a/hosts/Infini-FRAMEWORK/mount.bash b/hosts/Infini-FRAMEWORK/mount.bash index 3c75b81..503dd8d 100755 --- a/hosts/Infini-FRAMEWORK/mount.bash +++ b/hosts/Infini-FRAMEWORK/mount.bash @@ -1,20 +1,20 @@ #!/usr/bin/env bash # [[file:readme.org::mount][mount]] -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::boilerplate][boilerplate]]][boilerplate]] +# [[file:readme.org::mount][boilerplate]] DISK=$1 PART=$DISK$2 sudo mkdir -p /mnt # boilerplate ends here -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::mount_check][mount_check]]][mount_check]] +# [[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:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::mounting][mounting]]][mounting]] +# [[file:readme.org::mount][mounting]] echo "LOG: Mounting tmpfs" sudo mount -t tmpfs root /mnt diff --git a/hosts/Infini-FRAMEWORK/prep.bash b/hosts/Infini-FRAMEWORK/prep.bash index b753b00..a550e4f 100755 --- a/hosts/Infini-FRAMEWORK/prep.bash +++ b/hosts/Infini-FRAMEWORK/prep.bash @@ -1,20 +1,20 @@ #!/usr/bin/env bash # [[file:readme.org::preparation][preparation]] -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::boilerplate][boilerplate]]][boilerplate]] +# [[file:readme.org::boilerplate][boilerplate]] DISK=$1 PART=$DISK$2 sudo mkdir -p /mnt # boilerplate ends here -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::mount_check][mount_check]]][mount_check]] +# [[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:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::partitioning][partitioning]]][partitioning]] +# [[file:readme.org::partitioning][partitioning]] echo "LOG: Partitioning $DISK" sudo parted $DISK -- mktable gpt sudo parted $DISK -s -- mkpart ESP fat32 1MiB 512MiB @@ -23,7 +23,7 @@ sudo parted $DISK -s -- mkpart primary linux-swap -24GiB 100% sudo parted $DISK -s -- set 1 esp on # partitioning ends here -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::filesystems][filesystems]]][filesystems]] +# [[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" @@ -33,7 +33,7 @@ echo "- Making swap space on ${PART}3" sudo mkswap -L swap "${PART}3" # filesystems ends here -# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::subvolumes][subvolumes]]][subvolumes]] +# [[file:readme.org::subvolumes][subvolumes]] echo "LOG: Making subvolumes on ${PART}2" sudo mount "${PART}2" /mnt sudo btrfs subvolume create /mnt/root