2021-04-19 02:45:08 +00:00
|
|
|
{ lib }:
|
|
|
|
|
2021-04-24 01:13:03 +00:00
|
|
|
{ self, nixos, inputs, modules, ... } @ allArgs:
|
|
|
|
let args = builtins.removeAttrs allArgs [ "self" "nixos" "inputs" ]; in
|
2021-03-14 07:10:51 +00:00
|
|
|
lib.nixosSystem (args // {
|
|
|
|
modules =
|
|
|
|
let
|
2021-03-17 22:41:54 +00:00
|
|
|
moduleList = builtins.attrValues modules;
|
2021-03-14 07:10:51 +00:00
|
|
|
|
2021-03-18 20:58:01 +00:00
|
|
|
fullHostConfig = (lib.nixosSystem (args // { modules = moduleList; })).config;
|
|
|
|
|
2021-03-14 07:10:51 +00:00
|
|
|
isoConfig = (lib.nixosSystem
|
|
|
|
(args // {
|
2021-03-17 22:41:54 +00:00
|
|
|
modules = moduleList ++ [
|
2021-04-24 16:10:10 +00:00
|
|
|
(lib.modules.iso { inherit self nixos inputs fullHostConfig; })
|
2021-03-14 07:10:51 +00:00
|
|
|
];
|
|
|
|
})).config;
|
2021-03-23 14:37:11 +00:00
|
|
|
hmConfig = (lib.nixosSystem
|
|
|
|
(args // {
|
|
|
|
modules = moduleList ++ [
|
2021-04-24 16:10:10 +00:00
|
|
|
(lib.modules.hmConfig)
|
2021-03-23 14:37:11 +00:00
|
|
|
];
|
|
|
|
})).config;
|
2021-03-14 07:10:51 +00:00
|
|
|
in
|
2021-03-17 22:41:54 +00:00
|
|
|
moduleList ++ [{
|
2021-03-14 07:10:51 +00:00
|
|
|
system.build = {
|
|
|
|
iso = isoConfig.system.build.isoImage;
|
2021-03-23 14:37:11 +00:00
|
|
|
homes = hmConfig.home-manager.users;
|
2021-03-14 07:10:51 +00:00
|
|
|
};
|
|
|
|
}];
|
|
|
|
})
|