config: fix image format module condition

This commit is contained in:
Gabriel Arazas 2022-12-01 08:20:18 +08:00
parent 9a07eedb14
commit 9a0079a7fc

View File

@ -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
];