2021-02-06 09:31:48 +01:00
|
|
|
{ lib }:
|
|
|
|
let
|
2021-03-14 08:10:51 +01:00
|
|
|
inherit (lib) dev;
|
2021-02-06 09:31:48 +01:00
|
|
|
|
2021-03-14 08:10:51 +01:00
|
|
|
profiles = dev.os.mkProfileAttrs (toString ../profiles);
|
2021-03-23 15:36:23 +01:00
|
|
|
userProfiles = dev.os.mkProfileAttrs (toString ../users/profiles);
|
2021-03-14 08:10:51 +01:00
|
|
|
users = dev.os.mkProfileAttrs (toString ../users);
|
2021-02-06 09:31:48 +01:00
|
|
|
|
|
|
|
allProfiles =
|
2021-02-25 22:47:19 +01:00
|
|
|
let defaults = lib.collect (x: x ? default) profiles;
|
|
|
|
in map (x: x.default) defaults;
|
2021-02-06 09:31:48 +01:00
|
|
|
|
2021-02-25 22:47:19 +01:00
|
|
|
allUsers =
|
|
|
|
let defaults = lib.collect (x: x ? default) users;
|
|
|
|
in map (x: x.default) defaults;
|
2021-02-06 09:31:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
suites = with profiles; rec {
|
2021-02-25 22:47:19 +01:00
|
|
|
base = [ users.nixos users.root ];
|
2021-02-06 09:31:48 +01:00
|
|
|
};
|
2021-03-23 15:36:23 +01:00
|
|
|
|
|
|
|
# available as 'suites' within the home-manager configuration
|
|
|
|
userSuites = with userProfiles; rec {
|
|
|
|
base = [ direnv git ];
|
|
|
|
};
|
|
|
|
|
2021-02-06 09:31:48 +01:00
|
|
|
in
|
2021-03-23 15:36:23 +01:00
|
|
|
{
|
|
|
|
system = lib.mapAttrs (_: v: dev.os.profileMap v) suites // {
|
|
|
|
inherit allProfiles allUsers;
|
|
|
|
};
|
|
|
|
user = lib.mapAttrs (_: v: dev.os.profileMap v) userSuites // {
|
|
|
|
allProfiles = userProfiles;
|
|
|
|
};
|
2021-02-06 09:31:48 +01:00
|
|
|
}
|