automated iso download for pxe boot
This commit is contained in:
parent
bf5f9f799e
commit
46c2e595fe
10 changed files with 129 additions and 101 deletions
17
install.sh
Normal file
17
install.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
set -euo pipefail
|
||||
gdisk $DISK
|
||||
mkfs.fat -F 32 $ESPPART
|
||||
cryptsetup luksFormat $ROOTPART
|
||||
cryptsetup open $ROOTPART root
|
||||
mkfs.ext4 $ROOTPART
|
||||
mount /dev/mapper/root /mnt
|
||||
mount $ESPPART --mkdir -o umask=077 /mnt/boot
|
||||
mkdir /mnt/var
|
||||
mkswap -F -s $SWAPSIZE /mnt/var/swapfile
|
||||
swapon /mnt/var/swapfile
|
||||
mkdir -p /mnt/etc/nixos
|
||||
nixos-generate-config --root /mnt --kernel latest --flake
|
||||
#copy backup
|
||||
nixos-install --no-root-passwd --no-channel-copy --flake "/mnt/etc/nixos#nixos"
|
||||
sbctl enroll-keys --yes-this-might-brick-my-machine
|
||||
systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+2+7 $ROOTPART
|
||||
Loading…
Add table
Add a link
Reference in a new issue