os/profiles/suites.nix
Timothy DeHerrera c67b846929
profiles: add concept of suites
* Import attrs of profiles automatically with `defaultImport`.
* Refactor profiles to ensure all are functions returning a module.
* Add a suites.nix with collections of profiles.
* Add suites as `specialArgs` to modules.
* Add suite import to NixOS host.
2021-02-03 13:16:14 -07:00

29 lines
518 B
Nix

{ lib, profiles }:
let
inherit (builtins) mapAttrs isFunction;
all =
let
filtered = lib.filterAttrs (n: _: n != "core") profiles;
in
lib.collect isFunction filtered;
in
with profiles;
mapAttrs (_: v: lib.flk.profileMap v)
rec {
work = [ develop virt ];
graphics = work ++ [ graphical ];
mobile = graphics ++ [ laptop ];
play = graphics ++ [
graphical.games
torrent
misc.disable-mitigations
];
goPlay = play ++ [ laptop ];
} // {
inherit all;
}