Commit 3aed2ac7 authored by Michael Hoang's avatar Michael Hoang
Browse files

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
parent 62e0f05e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 $(</proc/cmdline); do