1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-23 16:11:51 +03:00

use config.lib.digga.mkBuild

This commit is contained in:
David Arnold 2021-06-19 14:28:24 -05:00 committed by Parthiv Seetharaman
parent 3ce5283d4e
commit 5a16e8f6e8

View File

@ -1,30 +1,26 @@
{ lib, pkgs, self, config, modules, channel, ... }:
let
mkBuild = buildModule:
channel.input.lib.nixosSystem {
inherit (pkgs) system;
inherit (config.lib) specialArgs;
modules = modules ++ [ buildModule ];
};
in
{
system.build = {
iso = (mkBuild (config.lib.digga.modules.isoConfig {
inherit self;
fullHostConfig = config;
})).config.system.build.isoImage;
iso = (config.lib.digga.mkBuild
(config.lib.digga.modules.isoConfig {
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;
homes = (config.lib.digga.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;
};
}