From 274486795af676e605cc2234478a5681c1f535b9 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Sun, 14 Sep 2025 19:53:37 +0200 Subject: [PATCH] data model: add name Signed-off-by: Kiara Grouwstra --- deployment/data-model.nix | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/deployment/data-model.nix b/deployment/data-model.nix index 86eac2d7..4a4ca9a1 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -261,10 +261,17 @@ in description = "Collection of deployment resources that can be required by applications and policed by hosting providers"; type = attrsOf ( submodule ( - { ... }: + resource: { _class = "fediversity-resource"; options = { + name = lib.mkOption { + type = lib.types.str; + description = "name of the resource"; + readOnly = true; + default = resource.config._module.args.name; + defaultText = "name of the resource"; + }; description = mkOption { description = "Description of the resource to help application module authors and hosting providers to work with it"; type = types.str; @@ -304,6 +311,13 @@ in submodule (application: { _class = "fediversity-application"; options = { + name = lib.mkOption { + type = lib.types.str; + description = "name of the application"; + readOnly = true; + default = application.config._module.args.name; + defaultText = "name of the application"; + }; description = mkOption { description = "Description to be shown in the application overview"; type = types.str; @@ -343,6 +357,13 @@ in submodule (environment: { _class = "fediversity-environment"; options = { + name = lib.mkOption { + type = lib.types.str; + description = "name of the environment"; + readOnly = true; + default = environment.config._module.args.name; + defaultText = "name of the environment"; + }; resources = mkOption { description = '' Resources made available by the hosting provider, and their policies.