From 3aed2ac768c72c0041b8b0b006a6e4c1554d0416 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Thu, 17 Jul 2025 14:41:21 +1000 Subject: [PATCH] nixos/installation-cd-base: fix installer expecting LUKS devices If we create an installer based on a configuration that uses LUKS and we try to boot it on an unformatted machine, it will fail waiting for the LUKS device to appear. We override `boot.initrd.luks.devices` like the `qemu-vm` module to solve this issue: https://github.com/NixOS/nixpkgs/blob/f23e0d855a4f6f055724f539a57dd95f57147778/nixos/modules/virtualisation/qemu-vm.nix#L1407-L1408 --- nixos/modules/installer/cd-dvd/installation-cd-base.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/installer/cd-dvd/installation-cd-base.nix b/nixos/modules/installer/cd-dvd/installation-cd-base.nix index d620e5e30fdf..48aabadb16a8 100644 --- a/nixos/modules/installer/cd-dvd/installation-cd-base.nix +++ b/nixos/modules/installer/cd-dvd/installation-cd-base.nix @@ -34,6 +34,7 @@ # system layout on a fresh machine, before it has been formatted. swapDevices = lib.mkImageMediaOverride [ ]; fileSystems = lib.mkImageMediaOverride config.lib.isoFileSystems; + boot.initrd.luks.devices = lib.mkImageMediaOverride { }; boot.postBootCommands = '' for o in $(