1
1
forked from extern/flakelight

Minor refactor in (nixos|home)Configurations

This commit is contained in:
Archit Gupta 2023-12-05 00:12:04 -08:00
parent 03ee8b84b9
commit 395ac91da0
2 changed files with 8 additions and 6 deletions

View File

@ -17,6 +17,8 @@ let
check = x: isAttrs x && x ? activationPackage;
merge = mergeOneOption;
};
configs = mapAttrs (_: f: f autoloadArgs) config.homeConfigurations;
in
{
options.homeConfigurations = mkOption {
@ -25,12 +27,11 @@ in
};
config.outputs = mkIf (config.homeConfigurations != { }) {
homeConfigurations = mapAttrs (_: f: f autoloadArgs)
config.homeConfigurations;
homeConfigurations = configs;
checks = foldl recursiveUpdate { } (mapAttrsToList
(n: v: {
${v.config.nixpkgs.system}."home-${n}" = v.activationPackage;
})
(mapAttrs (_: f: f autoloadArgs) config.homeConfigurations));
configs);
};
}

View File

@ -19,6 +19,8 @@ let
&& x ? config.system.build.toplevel;
merge = mergeOneOption;
};
configs = mapAttrs (_: f: f autoloadArgs) config.nixosConfigurations;
in
{
options.nixosConfigurations = mkOption {
@ -27,13 +29,12 @@ in
};
config.outputs = mkIf (config.nixosConfigurations != { }) {
nixosConfigurations = mapAttrs (_: f: f autoloadArgs)
config.nixosConfigurations;
nixosConfigurations = configs;
checks = foldl recursiveUpdate { } (mapAttrsToList
(n: v: {
${v.config.nixpkgs.system}."nixos-${n}" =
v.config.system.build.toplevel;
})
(mapAttrs (_: f: f autoloadArgs) config.nixosConfigurations));
configs);
};
}