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:
Valentin Gagarin 2025-07-01 23:59:16 +02:00 committed by Kiara Grouwstra
parent 17647b194b
commit 5b1993c800
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
2 changed files with 21 additions and 4 deletions

View file

@ -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;
};
}
);

View file

@ -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;
};
});
};
};
}