about summary refs log tree commit diff
path: root/machines/aszlig
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2020-09-14 23:41:28 +0200
committeraszlig <aszlig@nix.build>2020-09-14 23:51:16 +0200
commitf6561ac1edae7e795f1edaa96c73f4b34f0e9b04 (patch)
treedce1b7b85df75bd785e9f36d6a9f7ad0cc0c9f57 /machines/aszlig
parent6b872d71f22ec01d146935c28f37c49722a23255 (diff)
Use attribute sets for boot.initrd.luks.devices
This was one of the places where types.loaOf was still in place and it
got removed a while[1] ago and this in turn causes evaluation to fail
for quite a few machines:

  The option value `boot.initrd.luks.devices' in `...' is not of type
  `attribute set of submodules'.

I've not only changed all the machines to use attribute sets but also
fixed the check in core/tests.nix, because comparing against a list when
the actual type is an attribute set will result in all the LUKS tests to
be part of *all* channels, no matter whether you're actually using LUKS.

[1]: https://github.com/NixOS/nixpkgs/commit/20d491a317d9956ddca80913f07

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Profpatsch
Cc: @sternenseemann
Diffstat (limited to 'machines/aszlig')
-rw-r--r--machines/aszlig/managed/shakti.nix17
-rw-r--r--machines/aszlig/managed/tyree.nix16
-rw-r--r--machines/aszlig/tishtushi.nix16
3 files changed, 25 insertions, 24 deletions
diff --git a/machines/aszlig/managed/shakti.nix b/machines/aszlig/managed/shakti.nix
index 8440ce6f..e916914c 100644
--- a/machines/aszlig/managed/shakti.nix
+++ b/machines/aszlig/managed/shakti.nix
@@ -3,19 +3,20 @@
 {
   boot.loader.efi.canTouchEfiVariables = true;
 
-  boot.initrd.luks.devices = [
-    { name = "00vault";
+  boot.initrd.luks.devices = {
+    "00vault" = {
       device = "/dev/disk/by-uuid/a70f4ff8-e463-42fa-8148-6783dd352f96";
-    }
-    { name = "shakti-swap";
+    };
+    shakti-swap = {
       device = "/dev/disk/by-uuid/69f3a774-c796-4dbd-a38b-32f019d05e7c";
       keyFile = "/dev/mapper/00vault";
-    }
-    { name = "shakti-root";
+    };
+    shakti-root = {
       device = "/dev/disk/by-uuid/8a67bdf9-08bb-4214-b728-88cf1c2ee206";
       keyFile = "/dev/mapper/00vault";
-    }
-  ];
+    };
+  };
+
   boot.initrd.postDeviceCommands = lib.mkAfter ''
     cryptsetup luksClose /dev/mapper/00vault
   '';
diff --git a/machines/aszlig/managed/tyree.nix b/machines/aszlig/managed/tyree.nix
index 2f2c410d..c7190507 100644
--- a/machines/aszlig/managed/tyree.nix
+++ b/machines/aszlig/managed/tyree.nix
@@ -4,19 +4,19 @@
   boot.initrd.availableKernelModules = [ "usbhid" ];
   boot.kernelModules = [ "kvm-intel" ];
 
-  boot.initrd.luks.devices = [
-    { name = "00-vault";
+  boot.initrd.luks.devices = {
+    "00-vault" = {
       device = "/dev/disk/by-uuid/e4eb3d30-7fa5-4af4-86fb-80b47518cc25";
-    }
-    { name = "tyree-swap";
+    };
+    tyree-swap = {
       device = "/dev/disk/by-uuid/d96e29b4-0b9a-442d-af27-805f69ffffb3";
       keyFile = "/dev/mapper/00-vault";
-    }
-    { name = "tyree-root";
+    };
+    tyree-root = {
       device = "/dev/disk/by-uuid/21e9a86e-c8dc-4d8f-ba75-d03552dc32f7";
       keyFile = "/dev/mapper/00-vault";
-    }
-  ];
+    };
+  };
 
   boot.initrd.postDeviceCommands = lib.mkAfter ''
     cryptsetup luksClose /dev/mapper/00-vault
diff --git a/machines/aszlig/tishtushi.nix b/machines/aszlig/tishtushi.nix
index f38f894a..e8c22291 100644
--- a/machines/aszlig/tishtushi.nix
+++ b/machines/aszlig/tishtushi.nix
@@ -13,19 +13,19 @@
   };
 
   boot.initrd = {
-    luks.devices = [
-      { name = "00vault";
+    luks.devices = {
+      "00vault" = {
         device = "/dev/disk/by-uuid/812f19f1-9096-4367-b2e4-0c9537c52a67";
-      }
-      { name = "tishtushi-swap";
+      };
+      tishtushi-swap = {
         device = "/dev/disk/by-uuid/2934df87-5fda-4b2e-9f3b-c4c96f571407";
         keyFile = "/dev/mapper/00vault";
-      }
-      { name = "tishtushi-root";
+      };
+      tishtushi-root = {
         device = "/dev/disk/by-uuid/cf65f144-9205-40a5-a239-b660695a6740";
         keyFile = "/dev/mapper/00vault";
-      }
-    ];
+      };
+    };
     postDeviceCommands = lib.mkAfter ''
       cryptsetup luksClose /dev/mapper/00vault
     '';