forked from Fediversity/Fediversity
WIP: implement data model as in diagram
this doesn't update the tests yet because we don't have all the data types in place anyway yet, and I still need to come up with testable examples.
This commit is contained in:
parent
15967158bc
commit
dd0aff13d7
1 changed files with 23 additions and 7 deletions
|
@ -85,13 +85,29 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
deployments = mkOption {
|
||||
description = "Deployment of a configuration of applications to a run-time environment";
|
||||
type = attrsOf deployment;
|
||||
environments = mkOption {
|
||||
description = "Run-time environments for Fediversity applications to be deployed to";
|
||||
type = attrsOf (
|
||||
submodule (environment: {
|
||||
_class = "fediversity-environment";
|
||||
options = {
|
||||
resources = mkOption {
|
||||
description = "Resources made available by the hosting provider";
|
||||
type = attrsOf (
|
||||
attrTag (
|
||||
lib.mapAttrs' (name: resource: {
|
||||
${name} = mkOption { type = resource.provider; };
|
||||
}) config.resources
|
||||
)
|
||||
);
|
||||
};
|
||||
migrations = mkOption {
|
||||
description = "Migrations from Fediversity deployments to Fediversity run-time environments";
|
||||
type = attrsOf migration;
|
||||
resource-mapping = mkOption {
|
||||
description = "Mapping of resources required by applications to available resources; the result can be deployed";
|
||||
# TODO: type = consumer-resources /* same as the output of application.config-mapping, should be in a `let` */ -> nixops4Deployment
|
||||
};
|
||||
};
|
||||
})
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue