bootable targets: drive, pxe
This commit is contained in:
parent
2d4cf0b147
commit
9c0e1c011a
11 changed files with 88 additions and 64 deletions
13
install.sh
13
install.sh
|
|
@ -1,15 +1,12 @@
|
|||
gdisk $DISK
|
||||
mkfs.fat -F 32 $ESPPART
|
||||
mkfs.fat -F 32 -n $HOST-esp $ESPPART
|
||||
cryptsetup luksFormat $ROOTPART
|
||||
cryptsetup open $ROOTPART root
|
||||
mkfs.ext4 /dev/mapper/root
|
||||
mkfs.ext4 -L $HOST-root /dev/mapper/root
|
||||
mount /dev/mapper/root /mnt
|
||||
mount $ESPPART --mkdir -o umask=077 /mnt/boot
|
||||
mkdir -p /mnt/var/lib
|
||||
mkswap -F -s $SWAPSIZE /mnt/var/swapfile
|
||||
swapon /mnt/var/swapfile
|
||||
mount --mkdir $ESPPART /mnt/boot
|
||||
mkdir -p /mnt/var/lib
|
||||
# restore backup
|
||||
nixos-generate-config --root /mnt --show-hardware-config > /mnt/etc/nixos/$HOSTNAME/hardware.nix
|
||||
nixos-install --no-root-passwd --no-channel-copy --flake "/mnt/etc/nixos#nixos-$HOSTNAME"
|
||||
nixos-install --no-root-passwd --no-channel-copy --flake "/mnt/etc/nixos#nixos-$HOST"
|
||||
sbctl enroll-keys --yolo
|
||||
systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+2+7 $ROOTPART
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue