diff --git a/deployment/data-model.nix b/deployment/data-model.nix index 24e90284..59f907f3 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -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: