2021-04-19 02:45:08 +00:00
|
|
|
{ lib }:
|
2021-03-20 16:36:14 +00:00
|
|
|
|
|
|
|
{ users, profiles, userProfiles, suites } @ args:
|
|
|
|
let
|
2021-04-18 01:35:05 +00:00
|
|
|
inherit (lib) os;
|
2021-03-20 16:36:14 +00:00
|
|
|
|
|
|
|
definedSuites = suites {
|
|
|
|
inherit (args) users profiles userProfiles;
|
|
|
|
};
|
|
|
|
|
|
|
|
allProfiles =
|
|
|
|
let defaults = lib.collect (x: x ? default) profiles;
|
|
|
|
in map (x: x.default) defaults;
|
|
|
|
|
|
|
|
allUsers =
|
|
|
|
let defaults = lib.collect (x: x ? default) users;
|
|
|
|
in map (x: x.default) defaults;
|
|
|
|
|
|
|
|
createSuites = _: suites: lib.mapAttrs (_: v: os.profileMap v) suites // {
|
|
|
|
inherit allProfiles allUsers;
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
lib.mapAttrs createSuites definedSuites
|