diff --git a/deployment/data-model.nix b/deployment/data-model.nix index 7ff68e8a..83a1aaf4 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -8,7 +8,7 @@ let inherit (lib.types) attrsOf attrTag - deferredModule + deferredModuleWith mergeTypes nullOr submoduleWith @@ -24,14 +24,15 @@ in submodule ( { config, ... }: { + class = "fediversity-resource"; options = { consumer = mkOption { description = "Configuration of the resource by an application, a description of how the resource is consumed"; - type = deferredModule; + type = deferredModuleWith { staticModules = [ { class = "fediversity-resource-consumer"; } ]; }; }; provider = mkOption { description = "Configuration of the resource by the hosting provider, a description of how the resource is made available"; - type = deferredModule; + type = deferredModuleWith { staticModules = [ { class = "fediversity-resource-provider"; } ]; }; }; }; } @@ -44,10 +45,11 @@ in submodule ( { config, ... }: { + class = "fediversity-application"; options = { module = mkOption { description = "Operator-facing configuration options for the application"; - type = deferredModule; + type = deferredModuleWith { staticModules = [ { class = "fediversity-application-config"; } ]; }; }; config-mapping = mkOption { description = "Mapping of application configuration to deployment resources, a description of what an application needs to run"; @@ -64,6 +66,7 @@ in submodule ( { config, ... }: { + class = "fediversity-environment"; options = { required-resources = mkOption { description = "Resources required by configured applications";