mirror of
https://github.com/nix-community/flakelight.git
synced 2025-06-21 01:57:57 +02:00
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;
|
check = x: isAttrs x && x ? activationPackage;
|
||||||
merge = mergeOneOption;
|
merge = mergeOneOption;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configs = mapAttrs (_: f: f autoloadArgs) config.homeConfigurations;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.homeConfigurations = mkOption {
|
options.homeConfigurations = mkOption {
|
||||||
@ -25,12 +27,11 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config.outputs = mkIf (config.homeConfigurations != { }) {
|
config.outputs = mkIf (config.homeConfigurations != { }) {
|
||||||
homeConfigurations = mapAttrs (_: f: f autoloadArgs)
|
homeConfigurations = configs;
|
||||||
config.homeConfigurations;
|
|
||||||
checks = foldl recursiveUpdate { } (mapAttrsToList
|
checks = foldl recursiveUpdate { } (mapAttrsToList
|
||||||
(n: v: {
|
(n: v: {
|
||||||
${v.config.nixpkgs.system}."home-${n}" = v.activationPackage;
|
${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;
|
&& x ? config.system.build.toplevel;
|
||||||
merge = mergeOneOption;
|
merge = mergeOneOption;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configs = mapAttrs (_: f: f autoloadArgs) config.nixosConfigurations;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.nixosConfigurations = mkOption {
|
options.nixosConfigurations = mkOption {
|
||||||
@ -27,13 +29,12 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config.outputs = mkIf (config.nixosConfigurations != { }) {
|
config.outputs = mkIf (config.nixosConfigurations != { }) {
|
||||||
nixosConfigurations = mapAttrs (_: f: f autoloadArgs)
|
nixosConfigurations = configs;
|
||||||
config.nixosConfigurations;
|
|
||||||
checks = foldl recursiveUpdate { } (mapAttrsToList
|
checks = foldl recursiveUpdate { } (mapAttrsToList
|
||||||
(n: v: {
|
(n: v: {
|
||||||
${v.config.nixpkgs.system}."nixos-${n}" =
|
${v.config.nixpkgs.system}."nixos-${n}" =
|
||||||
v.config.system.build.toplevel;
|
v.config.system.build.toplevel;
|
||||||
})
|
})
|
||||||
(mapAttrs (_: f: f autoloadArgs) config.nixosConfigurations));
|
configs);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user