ark/lib/devos/mkSuites.nix
Pacman99 2cab5b5d2b add and use lib.collectProfiles
this function collects profiles recursively
2021-04-25 20:53:16 -07:00

21 lines
414 B
Nix

{ lib }:
{ users, profiles, userProfiles, suites } @ args:
let
inherit (lib) os;
definedSuites = suites {
inherit (args) users profiles userProfiles;
};
allProfiles = lib.collectProfiles profiles;
allUsers = lib.collectProfiles users;
createSuites = _: suites: lib.mapAttrs (_: v: os.profileMap v) suites // {
inherit allProfiles allUsers;
};
in
lib.mapAttrs createSuites definedSuites