about summary refs log tree commit diff
path: root/machines/aszlig
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2020-01-18 16:52:34 +0100
committeraszlig <aszlig@nix.build>2020-01-18 16:52:34 +0100
commitda1985c5aeaf512c3d9b92d8585e345a996788ac (patch)
tree9d6f7665c8dfc6ee318d3e1019a41786a6b9f9a2 /machines/aszlig
parentfefcad6f04c040b2c6d71874b8b923dc455c9153 (diff)
machines/dnyarri: Provide luks.devices as attrset
The use of types.loaOf has been deprecated since quite a while and
lately[1] there is also an appropriate warning in place if an option
definition relies on types.loaOf to coerce the list to an attrset.

In vuizvui we didn't rely on types.loaOf, but it turned out that dnyarri
still relied on it in boot.initrd.luks.devices.

Since we already use attrsets for defining the LUKS devices, it's rather
easy to fix and we just need to return a nameValuePair in mkDevice.

[1]: https://github.com/NixOS/nixpkgs/commit/03309899eb41e50ef65001f63d6a4f078e3d4556

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'machines/aszlig')
-rw-r--r--machines/aszlig/dnyarri.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/machines/aszlig/dnyarri.nix b/machines/aszlig/dnyarri.nix
index be7ecaba..3d9ae86a 100644
--- a/machines/aszlig/dnyarri.nix
+++ b/machines/aszlig/dnyarri.nix
@@ -3,7 +3,7 @@
 let
   mkDevice = category: num: uuid: {
     name = "dnyarri-${category}-crypt-${toString num}";
-    device = "/dev/disk/by-uuid/${uuid}";
+    value.device = "/dev/disk/by-uuid/${uuid}";
   };
 
   cryptDevices = {
@@ -51,7 +51,8 @@ in {
 
     initrd = {
       availableKernelModules = [ "bcache" ];
-      luks.devices = lib.concatLists (lib.attrValues cryptDevices);
+      luks.devices =
+        lib.listToAttrs (lib.concatLists (lib.attrValues cryptDevices));
     };
   };