From 0d99556ff55d62244f0cb652b3ea843f564adbe7 Mon Sep 17 00:00:00 2001
From: Jens Nolte <git@queezle.net>
Date: Sat, 14 Aug 2021 23:56:37 +0200
Subject: [PATCH] Ask for LUKS passphrase during installation

---
 bin/lib/installation.nix | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bin/lib/installation.nix b/bin/lib/installation.nix
index 45df5d7..fad135e 100644
--- a/bin/lib/installation.nix
+++ b/bin/lib/installation.nix
@@ -41,12 +41,16 @@ assert (typeOf swap) == "string";
     set -u
     set -o pipefail
 
+    ${if luks then ''
+      read -r -s "luks?Please enter the new LUKS passphrase:"
+    '' else ""}
+
     # Generate config
     <<EOF
     {
       "blockDevice": null
       ${if luks then ''
-        ,"luksKey": "foobar"
+        ,"luksKey": "$luks"
       '' else ""}
     }
     EOF
-- 
GitLab