refactor: cleanup and extract user config
This commit is contained in:
@@ -361,6 +361,23 @@ in
|
||||
readOnly = true;
|
||||
};
|
||||
|
||||
options.meta.lib.accounts = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
apply = lib.mapAttrs (
|
||||
name: account:
|
||||
let
|
||||
accountName = account.name or name;
|
||||
in
|
||||
account
|
||||
// {
|
||||
name = accountName;
|
||||
}
|
||||
);
|
||||
description = "Canonical account attrsets shared by host definitions.";
|
||||
internal = true;
|
||||
};
|
||||
|
||||
config.meta.lib = {
|
||||
inherit
|
||||
mkInputProfiles
|
||||
|
||||
Reference in New Issue
Block a user