os/lib/devos/devosSystem.nix

41 lines
954 B
Nix
Raw Normal View History

2021-04-19 02:45:08 +00:00
{ lib }:
# dependencies to return a builder
{ self, inputs }:
{ modules, specialArgs, ... } @ args:
let inherit (specialArgs.channel.input.lib) nixosSystem; in
nixosSystem
(args // {
modules =
let
fullHostConfig = (nixosSystem (args // { inherit modules; })).config;
isoConfig = (nixosSystem
(args // {
modules = modules ++ [
(lib.modules.iso { inherit self inputs fullHostConfig; })
];
})).config;
hmConfig = (nixosSystem
(args // {
modules = modules ++ [
(lib.modules.hmConfig)
];
})).config;
in
modules ++ [{
system.build = {
iso = isoConfig.system.build.isoImage;
homes = hmConfig.home-manager.users;
};
lib = {
inherit specialArgs;
testModule = {
imports = modules;
};
};
}];
})