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
|
functionTo
|
||||||
;
|
;
|
||||||
|
|
||||||
functionType = import ./function.nix;
|
|
||||||
application-resources = submodule {
|
application-resources = submodule {
|
||||||
options.resources = mkOption {
|
options.resources = mkOption {
|
||||||
# TODO: maybe transpose, and group the resources by type instead
|
# TODO: maybe transpose, and group the resources by type instead
|
||||||
|
@ -124,24 +123,16 @@ in
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
implementation = mkOption {
|
implementation = mkOption {
|
||||||
description = "Mapping of resources required by applications to available resources; the result can be deployed";
|
description = "Mapping from resources required by applications to available resources to a deployment";
|
||||||
type = environment.config.resource-mapping.function-type;
|
# input: application-resources
|
||||||
};
|
type = functionTo nixops4Deployment;
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
# TODO(@fricklerhandwerk): maybe this should be a separate thing such as `fediversity-setup`,
|
# TODO(@fricklerhandwerk): maybe this should be a separate thing such as `fediversity-setup`,
|
||||||
# which makes explicit which applications and environments are available.
|
# 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.
|
# then the deployments can simply be the result of the function application baked into this module.
|
||||||
deployment = mkOption {
|
deployment = mkOption {
|
||||||
description = "Generate a deployment from a configuration, by applying an environment's resource policies to the applications' resource mappings";
|
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;
|
readOnly = true;
|
||||||
default =
|
default =
|
||||||
cfg:
|
cfg:
|
||||||
|
|
Loading…
Add table
Reference in a new issue