* 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
This commit is contained in:
Eelco Dolstra 2010-10-25 22:21:51 +00:00
parent 421a80ae8f
commit dff372db3c
2 changed files with 3 additions and 3 deletions

@ -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/