From 5a3c6ae08f9bd78c11128267db2e51c248613a7a Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Tue, 1 Jul 2025 15:28:46 +0200 Subject: [PATCH] WIP --- deployment/data-model.nix | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/deployment/data-model.nix b/deployment/data-model.nix index 83a1aaf4..a2bcc711 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -42,22 +42,19 @@ in applications = mkOption { description = "Collection of Fediversity applications"; type = attrsOf ( - submodule ( - { config, ... }: - { - class = "fediversity-application"; - options = { - module = mkOption { - description = "Operator-facing configuration options for the application"; - 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"; - # TODO: type = (submodule config.module) -> (attrsOf resource) - }; + submodule (application: { + class = "fediversity-application"; + options = { + module = mkOption { + description = "Operator-facing configuration options for the application"; + 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"; + # TODO: type = (submodule application.config.module) -> (attrsOf (attrTag (map (name: resource: { ${name} = mkOption { type = resource.consumer; }; }) config.resources))) /* something like that */ + }; + }; + }) ); }; environments = mkOption { @@ -87,4 +84,7 @@ in ); }; }; +} + }; + }; }