hosts/Infini-STICK: separate install scripts
This commit is contained in:
parent
df3c87c6b0
commit
61fc46fed5
3 changed files with 121 additions and 14 deletions
41
hosts/Infini-STICK/reinstall.bash
Executable file
41
hosts/Infini-STICK/reinstall.bash
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env bash
|
||||
# [[file:readme.org::reinstall][reinstall]]
|
||||
# [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::boilerplate][boilerplate]]][boilerplate]]
|
||||
DISK=$1
|
||||
|
||||
sudo mkdir -p /mnt
|
||||
# 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
|
||||
|
||||
# [[[[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
|
||||
# installing ends here
|
||||
|
||||
# [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::reinstall_extra][reinstall_extra]]][reinstall_extra]]
|
||||
|
||||
# reinstall_extra ends here
|
||||
|
||||
# [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::finishing_setup][finishing_setup]]][finishing_setup]]
|
||||
|
||||
# finishing_setup ends here
|
||||
|
||||
# [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::cleanup][cleanup]]][cleanup]]
|
||||
echo "LOG: Unmounting all"
|
||||
sudo umount -R /mnt
|
||||
# cleanup ends here
|
||||
# reinstall ends here
|
Loading…
Add table
Add a link
Reference in a new issue