aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-03-25 17:58:37 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2023-03-25 17:58:37 +0100
commit0590a080e80845f63c90c4e9c13b33a53e6904e5 (patch)
treea302125f83a016a7bda0d8b6a856ad43f5b67807
parent33f67e0414ef122dcf0296977964360437d50baa (diff)
remove --key-file from encryption with password
-rwxr-xr-xnais6
1 files changed, 3 insertions, 3 deletions
diff --git a/nais b/nais
index 2c6854c..0ee12cc 100755
--- a/nais
+++ b/nais
@@ -86,8 +86,8 @@ install_arch() {
uuid=$(lsblk --raw -o PATH,UUID | grep "$root" | awk '{ print $2 }')
- echo "$PASSWORD" | cryptsetup luksFormat --type luks1 "$boot" - || exit
- echo "$PASSWORD" | cryptsetup open --key-file - "$boot" boot || exit
+ printf "%s" "$PASSWORD" | cryptsetup luksFormat --type luks1 "$boot" || exit
+ printf "%s" "$PASSWORD" | cryptsetup open "$boot" boot || exit
mkfs.vfat /dev/mapper/boot || exit
mount --mkdir /dev/mapper/boot /mnt/boot || exit
@@ -96,7 +96,7 @@ install_arch() {
pacstrap -K /mnt base linux linux-firmware neovim neomutt wayland wayland-protocols wlroots xorg-xwayland git base-devel networkmanager btrfs-progs sudo grub efibootmgr
dd if=/dev/random of=/mnt/etc/.bootkey bs=1024 count=4
- printf "%s\n" "$PASSWORD" | cryptsetup luksAddKey "$boot" /mnt/etc/.bootkey || exit
+ printf "%s" "$PASSWORD" | cryptsetup luksAddKey "$boot" /mnt/etc/.bootkey || exit
genfstab -U /mnt >> /mnt/etc/fstab || exit