forked from extern/flakelight
Minor refactor in (nixos|home)Configurations
This commit is contained in:
parent
03ee8b84b9
commit
395ac91da0
@ -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);
|
||||
};
|
||||
}
|
||||
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user