forked from fediversity/fediversity
Compare commits
3 commits
8ac7782803
...
c6f82f2e0a
| Author | SHA1 | Date | |
|---|---|---|---|
| c6f82f2e0a | |||
| e91061e69c | |||
| ed240f0db1 |
3 changed files with 5 additions and 4 deletions
|
|
@ -185,6 +185,7 @@ in
|
||||||
deploymentFunction = lib.isFunction result.deploymentFunction;
|
deploymentFunction = lib.isFunction result.deploymentFunction;
|
||||||
getProviders = lib.isFunction result.getProviders;
|
getProviders = lib.isFunction result.getProviders;
|
||||||
};
|
};
|
||||||
|
deploy = lib.isFunction fediversity.deployments.example.deployment;
|
||||||
};
|
};
|
||||||
expected = {
|
expected = {
|
||||||
number-of-resources = 1;
|
number-of-resources = 1;
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ in
|
||||||
resource-mapping = mkOption {
|
resource-mapping = mkOption {
|
||||||
description = "Function type for the mapping from resources to a (NixOps4) deployment";
|
description = "Function type for the mapping from resources to a (NixOps4) deployment";
|
||||||
type = functionType;
|
type = functionType;
|
||||||
readOnly = true;
|
# readOnly = true;
|
||||||
default = {
|
default = {
|
||||||
# input-type = application-resources;
|
# input-type = application-resources;
|
||||||
input-type = types.int;
|
input-type = types.int;
|
||||||
|
|
@ -203,14 +203,14 @@ in
|
||||||
};
|
};
|
||||||
environment = mkOption {
|
environment = mkOption {
|
||||||
description = "The run-time environment to deploy to";
|
description = "The run-time environment to deploy to";
|
||||||
type = options.environments.nestedType;
|
type = options.environments.type.nestedTypes.elemType;
|
||||||
};
|
};
|
||||||
# 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 deployment.config.environment.resource-mapping.output-type;
|
type = deployment.config.environment.resource-mapping.output-type;
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
# TODO: check cfg.enable.true
|
# TODO: check cfg.enable.true
|
||||||
default =
|
default =
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ submodule (function: {
|
||||||
};
|
};
|
||||||
function-type = mkOption {
|
function-type = mkOption {
|
||||||
type = optionType;
|
type = optionType;
|
||||||
readOnly = true;
|
# readOnly = true;
|
||||||
default = functionTo (submodule {
|
default = functionTo (submodule {
|
||||||
options = {
|
options = {
|
||||||
input = mkOption {
|
input = mkOption {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue