mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
flake-parts/setups/nixos: fix images output build
This commit is contained in:
parent
1825a97c74
commit
6ae54e2b55
@ -356,20 +356,27 @@ in
|
|||||||
let
|
let
|
||||||
validImages = lib.filterAttrs
|
validImages = lib.filterAttrs
|
||||||
(host: metadata:
|
(host: metadata:
|
||||||
metadata.formats != null && (lib.elem system metadata.systems))
|
metadata.formats != null && (lib.elem system metadata.systems))
|
||||||
cfg.configs;
|
cfg.configs;
|
||||||
in
|
|
||||||
lib.mapAttrs'
|
generateImages = name: metadata:
|
||||||
(host: metadata:
|
|
||||||
let
|
let
|
||||||
name = metadata.hostname or host;
|
images =
|
||||||
nixpkgs-channel = metadata.nixpkgs-channel or "nixpkgs";
|
builtins.map
|
||||||
|
(format:
|
||||||
|
lib.nameValuePair
|
||||||
|
"${name}-${format}"
|
||||||
|
(mkImage {
|
||||||
|
inherit (metadata) nixpkgs-branch;
|
||||||
|
inherit system format;
|
||||||
|
extraModules = cfg.sharedModules ++ metadata.modules;
|
||||||
|
}))
|
||||||
|
metadata.formats;
|
||||||
in
|
in
|
||||||
lib.nameValuePair name (mkImage {
|
lib.listToAttrs images;
|
||||||
inherit (metadata) format;
|
in
|
||||||
inherit nixpkgs-channel system;
|
lib.concatMapAttrs
|
||||||
extraModules = cfg.sharedModules ++ metadata.modules;
|
(name: metadata: generateImages name metadata)
|
||||||
}))
|
|
||||||
validImages;
|
validImages;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user