Skip to content

Commit

Permalink
Try #201:+
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Mar 18, 2021
2 parents 2961c1e + ab523ef commit 425481c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
13 changes: 13 additions & 0 deletions lib/devos/mkProfileAttrs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ let mkProfileAttrs =
Example:
let profiles = mkProfileAttrs ./profiles; in
assert profiles ? core.default; 0
Example folder layout:
profiles/core/default.nix
profiles/core/sub/default.nix
profiles/code/ignored-no-default-nix/
profiles/other/default.nix
Example result:
{
core = { default = "..." };
sub = { default = "..." };
other = { default = "..." };
}
**/
dir:
let
Expand Down
12 changes: 4 additions & 8 deletions suites/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,15 @@ let
profiles = dev.os.mkProfileAttrs (toString ../profiles);
users = dev.os.mkProfileAttrs (toString ../users);

allProfiles =
let defaults = lib.collect (x: x ? default) profiles;
in map (x: x.default) defaults;
allProfiles = dev.os.profileMap profiles;

allUsers =
let defaults = lib.collect (x: x ? default) users;
in map (x: x.default) defaults;
allUsers = dev.os.profileMap users;


suites = with profiles; rec {
base = [ users.nixos users.root ];
base = dev.os.profileMap [ users.nixos users.root ];
};
in
lib.mapAttrs (_: v: dev.os.profileMap v) suites // {
suites // {
inherit allProfiles allUsers;
}

0 comments on commit 425481c

Please sign in to comment.