2021-05-14 19:17:53 +02:00
|
|
|
{ lib, self, diggaLib, config, modules, channel, ... }:
|
2021-04-28 20:30:04 +02:00
|
|
|
let
|
|
|
|
mkBuild = buildModule:
|
2021-05-12 20:43:27 +02:00
|
|
|
# TODO: get specialArgs as a module argument and drop builderArgs usage
|
2021-05-14 19:17:53 +02:00
|
|
|
channel.input.lib.nixosSystem (diggaLib.mergeAny config.lib.builderArgs {
|
2021-04-28 20:30:04 +02:00
|
|
|
modules = [ buildModule ];
|
|
|
|
});
|
|
|
|
in
|
|
|
|
{
|
|
|
|
system.build = {
|
2021-05-14 19:17:53 +02:00
|
|
|
iso = (mkBuild (diggaLib.modules.isoConfig {
|
2021-04-28 20:30:04 +02:00
|
|
|
inherit self;
|
|
|
|
fullHostConfig = config;
|
|
|
|
})).config.system.build.isoImage;
|
|
|
|
|
|
|
|
homes = (mkBuild ({ config, ... }: {
|
|
|
|
home-manager.useUserPackages = lib.mkForce false;
|
|
|
|
home-manager.sharedModules = [
|
|
|
|
{
|
|
|
|
home.sessionVariables = {
|
|
|
|
inherit (config.environment.sessionVariables) NIX_PATH;
|
|
|
|
};
|
|
|
|
xdg.configFile."nix/registry.json".text =
|
|
|
|
config.environment.etc."nix/registry.json".text;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
})).config.home-manager.users;
|
|
|
|
};
|
|
|
|
}
|