os/suites/default.nix

25 lines
531 B
Nix
Raw Normal View History

2021-02-06 08:31:48 +00:00
{ lib }:
let
inherit (builtins) mapAttrs isFunction;
inherit (lib.flk) importDefaults;
profiles = importDefaults (toString ../profiles);
users = importDefaults (toString ../users);
allProfiles =
let
sansCore = lib.filterAttrs (n: _: n != "core") profiles;
in
lib.collect isFunction sansCore;
allUsers = lib.collect isFunction users;
suites = with profiles; rec {
core = [ users.nixos users.root ];
};
in
mapAttrs (_: v: lib.flk.profileMap v) suites // {
inherit allProfiles allUsers;
}