forked from Fediversity/Fediversity
remove module functions from environment
This commit is contained in:
parent
2be6684d68
commit
70789547ee
1 changed files with 4 additions and 13 deletions
|
@ -15,7 +15,6 @@ let
|
|||
functionTo
|
||||
;
|
||||
|
||||
functionType = import ./function.nix;
|
||||
application-resources = submodule {
|
||||
options.resources = mkOption {
|
||||
# TODO: maybe transpose, and group the resources by type instead
|
||||
|
@ -124,24 +123,16 @@ in
|
|||
);
|
||||
};
|
||||
implementation = mkOption {
|
||||
description = "Mapping of resources required by applications to available resources; the result can be deployed";
|
||||
type = environment.config.resource-mapping.function-type;
|
||||
};
|
||||
resource-mapping = mkOption {
|
||||
description = "Function type for the mapping from resources to a (NixOps4) deployment";
|
||||
type = submodule functionType;
|
||||
readOnly = true;
|
||||
default = {
|
||||
input-type = application-resources;
|
||||
output-type = nixops4Deployment;
|
||||
};
|
||||
description = "Mapping from resources required by applications to available resources to a deployment";
|
||||
# input: application-resources
|
||||
type = functionTo nixops4Deployment;
|
||||
};
|
||||
# TODO(@fricklerhandwerk): maybe this should be a separate thing such as `fediversity-setup`,
|
||||
# which makes explicit which applications and environments are available.
|
||||
# then the deployments can simply be the result of the function application baked into this module.
|
||||
deployment = mkOption {
|
||||
description = "Generate a deployment from a configuration, by applying an environment's resource policies to the applications' resource mappings";
|
||||
type = functionTo (environment.config.resource-mapping.output-type);
|
||||
type = functionTo nixops4Deployment;
|
||||
readOnly = true;
|
||||
default =
|
||||
cfg:
|
||||
|
|
Loading…
Add table
Reference in a new issue