* Make the boot.initrd.luks.enable option obsolete. It's enough to

see that boot.initrd.luks.devices is non-empty.

svn path=/nixos/trunk/; revision=34120
This commit is contained in:
Eelco Dolstra 2012-05-15 20:45:01 +00:00
parent 28cc602751
commit 07fcf5baee

View File

@ -33,15 +33,13 @@ in
options = { options = {
boot.initrd.luks.enable = mkOption { boot.initrd.luks.enable = mkOption {
default = false; default = false;
description = ''; description = "Obsolete.";
Have luks in the initrd.
'';
}; };
boot.initrd.luks.devices = mkOption { boot.initrd.luks.devices = mkOption {
default = [ ]; default = [ ];
example = [ { name = "luksroot"; device = "/dev/sda3"; preLVM = true; } ]; example = [ { name = "luksroot"; device = "/dev/sda3"; preLVM = true; } ];
description = ''; description = ''
The list of devices that should be decrypted using LUKS before trying to mount the The list of devices that should be decrypted using LUKS before trying to mount the
root partition. This works for both LVM-over-LUKS and LUKS-over-LVM setups. root partition. This works for both LVM-over-LUKS and LUKS-over-LVM setups.
@ -75,7 +73,7 @@ in
}; };
}; };
config = mkIf luks.enable { config = mkIf (luks.devices != []) {
# Some modules that may be needed for mounting anything ciphered # Some modules that may be needed for mounting anything ciphered
boot.initrd.kernelModules = [ "aes_generic" "aes_x86_64" "dm_mod" "dm_crypt" boot.initrd.kernelModules = [ "aes_generic" "aes_x86_64" "dm_mod" "dm_crypt"