From 27aab3e5408a2205ceaab76fa995852b53c6fe46 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 23 Oct 2021 23:29:09 +0200 Subject: [PATCH] initrd: make keyfile optional --- modules/x-os/boot.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/x-os/boot.nix b/modules/x-os/boot.nix index 131dec8c..dff8d526 100644 --- a/modules/x-os/boot.nix +++ b/modules/x-os/boot.nix @@ -23,7 +23,7 @@ with lib; { # Use Keyfile to unlock the root partition to avoid keying in twice. # Allow fstrim to work on it. - boot.initrd = { + boot.initrd = mkIf cfg.enableBootLoader { secrets = { "/keyfile.bin" = cfg.keyfile; }; luks.devices."cryptroot" = { keyFile = "/keyfile.bin";