This commit is contained in:
Valentin Gagarin 2025-07-01 15:17:32 +02:00
parent 21aaa26510
commit 6ae158bd0f

View file

@ -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";