* Fix evaluation of the luksroot module when luksRoot == null. The

problem is that configuration values below a mkIf are evaluated
  strictly even if the condition is false.  Thus "${luksRoot}" causes
  an evaluation error.  As a workaround, use the empty string instead
  of `null' as the default value.  However, we should really fix the
  laziness of mkIf.  It's likely that NixOS evaluation would be much
  faster if it didn't have to evaluate disabled configuration values.

svn path=/nixos/trunk/; revision=24477
wip/yesman
Eelco Dolstra 14 years ago
parent 421a80ae8f
commit dff372db3c
  1. 2
      modules/module-list.nix
  2. 4
      modules/system/boot/luksroot.nix

@ -146,7 +146,7 @@
./system/activation/activation-script.nix
./system/activation/top-level.nix
./system/boot/kernel.nix
#./system/boot/luksroot.nix
./system/boot/luksroot.nix
./system/boot/modprobe.nix
./system/boot/stage-1.nix
./system/boot/stage-2.nix

@ -10,7 +10,7 @@ in
options = {
boot.initrd.luksRoot = mkOption {
default = null;
default = "";
example = "/dev/sda3";
description = '';
The device that should be decrypted using LUKS before trying to mount the
@ -26,7 +26,7 @@ in
config = mkIf (luksRoot != null) {
config = mkIf (luksRoot != "") {
boot.initrd.extraUtilsCommands = ''
cp -r ${pkgs.cryptsetup}/lib/* $out/lib/

Loading…
Cancel
Save