From 9a0079a7fcbdae2e7fb09615909f3790ddffb3a7 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Thu, 1 Dec 2022 08:20:18 +0800 Subject: [PATCH] config: fix image format module condition --- flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index afa83a32..8f558934 100644 --- a/flake.nix +++ b/flake.nix @@ -342,7 +342,10 @@ # modules. networking.hostName = lib.mkOverride 2000 host'; }) - (lib'.optionalAttrs (images ? host') inputs.nixos-generators.nixosModules.${images.${host'}.format}) + (lib'.optionalAttrs (lib'.hasAttr host' images) + (let + imageFormat = images.${host'}.format; + in inputs.nixos-generators.nixosModules.${imageFormat})) hostSharedConfig path ];