summary refs log tree commit diff
path: root/nixos/tests/installer.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-05-25 13:23:32 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-05-25 18:04:21 +0200
commit845c9b50bf7137c3e21f443e70ebcb16510f4e68 (patch)
tree0eddfbc8f8cf4140c392a1765966d543db3a8f6d /nixos/tests/installer.nix
parentbf2aaeb0f670d845821c9d50726b2cbf4a70e4e9 (diff)
downloadnixpkgs-845c9b50bf7137c3e21f443e70ebcb16510f4e68.tar
nixpkgs-845c9b50bf7137c3e21f443e70ebcb16510f4e68.tar.gz
nixpkgs-845c9b50bf7137c3e21f443e70ebcb16510f4e68.tar.bz2
nixpkgs-845c9b50bf7137c3e21f443e70ebcb16510f4e68.tar.lz
nixpkgs-845c9b50bf7137c3e21f443e70ebcb16510f4e68.tar.xz
nixpkgs-845c9b50bf7137c3e21f443e70ebcb16510f4e68.tar.zst
nixpkgs-845c9b50bf7137c3e21f443e70ebcb16510f4e68.zip
boot.initrd.luks.devices: Change into an attribute set
This allows setting options for the same LUKS device in different
modules. For example, the auto-generated hardware-configuration.nix
can contain

  boot.initrd.luks.devices.crypted.device = "/dev/disk/...";

while configuration.nix can add

  boot.initrd.luks.devices.crypted.allowDiscards = true;

Also updated the examples/docs to use /disk/disk/by-uuid instead of
/dev/sda, since we shouldn't promote the use of the latter.
Diffstat (limited to 'nixos/tests/installer.nix')
-rw-r--r--nixos/tests/installer.nix3
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix
index 7b949ff93be..866f9882536 100644
--- a/nixos/tests/installer.nix
+++ b/nixos/tests/installer.nix
@@ -363,8 +363,7 @@ in {
       # XXX: Currently, generate-config doesn't detect LUKS yet.
       extraConfig = ''
         boot.kernelParams = lib.mkAfter [ "console=tty0" ];
-        boot.initrd.luks.devices = lib.singleton {
-          name = "cryptroot";
+        boot.initrd.luks.devices.cryptroot = {
           device = "/dev/vda3";
           preLVM = true;
         };