forked from Fediversity/Fediversity
WIP: start writing an evaluation test
turns out we also need a collection of configurations, obviously next: figure out where to wire everything up to obtain a deployment
This commit is contained in:
parent
17647b194b
commit
5b1993c800
2 changed files with 21 additions and 4 deletions
|
@ -50,9 +50,12 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
migrations.boo = {
|
||||
deployment = config.deployments.baz;
|
||||
runtime-environment = config.resources.bar.runtime-environment;
|
||||
environments.single-nixos-vm = {
|
||||
|
||||
};
|
||||
configurations.example = {
|
||||
enable = true;
|
||||
applications.hello.enable = true;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
@ -105,8 +105,10 @@ in
|
|||
resource-mapping = mkOption {
|
||||
description = "Mapping of resources required by applications to available resources; the result can be deployed";
|
||||
type = environment.config.function.implementation;
|
||||
# TODO: type = consumer-resources /* same as the output of application.config-mapping, should be in a `let` */ -> nixops4Deployment
|
||||
};
|
||||
# TODO: somewhere we still need to
|
||||
# - apply = { implementation = resource-mapping; input = <resource requirements of configured applications>; }
|
||||
# - apply.output (deployment)
|
||||
function = mkOption {
|
||||
description = "Function type for the mapping from resources to a (NixOps4) deployment";
|
||||
type = submodule functionType;
|
||||
|
@ -120,5 +122,17 @@ in
|
|||
})
|
||||
);
|
||||
};
|
||||
configurations = mkOption {
|
||||
description = "Application configurations set by operators";
|
||||
type = attrsOf (submodule {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
description = "Whether to enable the configuration";
|
||||
type = types.bool;
|
||||
};
|
||||
applications = mapAttrs (name: application: submodule application.module) config.applications;
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue