From f6561ac1edae7e795f1edaa96c73f4b34f0e9b04 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 14 Sep 2020 23:41:28 +0200 Subject: 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 Cc: @Profpatsch Cc: @sternenseemann --- machines/aszlig/managed/shakti.nix | 17 +++++++++-------- machines/aszlig/managed/tyree.nix | 16 ++++++++-------- 2 files changed, 17 insertions(+), 16 deletions(-) (limited to 'machines/aszlig/managed') 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 -- cgit 1.4.1