WIP: implement data model as in diagram

this doesn't update the tests yet because we don't have all the data
types in place anyway yet, and I still need to come up with testable examples.
This commit is contained in:
Valentin Gagarin 2025-07-01 12:16:29 +02:00 committed by Kiara Grouwstra
parent 15967158bc
commit dd0aff13d7
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU

View file

@ -85,13 +85,29 @@ in
}; };
}; };
}; };
deployments = mkOption { environments = mkOption {
description = "Deployment of a configuration of applications to a run-time environment"; description = "Run-time environments for Fediversity applications to be deployed to";
type = attrsOf deployment; type = attrsOf (
}; submodule (environment: {
migrations = mkOption { _class = "fediversity-environment";
description = "Migrations from Fediversity deployments to Fediversity run-time environments"; options = {
type = attrsOf migration; resources = mkOption {
description = "Resources made available by the hosting provider";
type = attrsOf (
attrTag (
lib.mapAttrs' (name: resource: {
${name} = mkOption { type = resource.provider; };
}) config.resources
)
);
};
resource-mapping = mkOption {
description = "Mapping of resources required by applications to available resources; the result can be deployed";
# TODO: type = consumer-resources /* same as the output of application.config-mapping, should be in a `let` */ -> nixops4Deployment
};
};
})
);
}; };
}; };
} }