diff --git a/deployment/data-model-test.nix b/deployment/data-model-test.nix index 64cfaf0d..0deeb563 100644 --- a/deployment/data-model-test.nix +++ b/deployment/data-model-test.nix @@ -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; }; } ); diff --git a/deployment/data-model.nix b/deployment/data-model.nix index b6348b03..de58f351 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -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 = ; } + # - 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; + }; + }); + }; }; }