fix application-requirements

This commit is contained in:
Kiara Grouwstra 2025-07-21 20:47:05 +02:00
parent a6fc12709d
commit 7ec11ebde8
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU

View file

@ -16,15 +16,6 @@ let
;
functionType = import ./function.nix;
application-requirements = {
_class = "fediversity-application-requirements";
options.resources = mkOption {
# TODO: maybe transpose, and group the resources by type instead
type = attrsOf (
attrTag (lib.mapAttrs (_name: resource: mkOption { type = resource.request; }) config.resources)
);
};
};
nixops4Deployment = inputs.nixops4.modules.nixops4Deployment.default;
in
{
@ -83,7 +74,12 @@ in
};
resources = mkOption {
description = "Mapping of application configuration to deployment resources, a description of what an application needs to run";
type = functionTo (types.submodule application-requirements);
# TODO: maybe transpose, and group the resources by type instead
type = functionTo (
attrsOf (
attrTag (lib.mapAttrs (_name: resource: mkOption { type = resource.request; }) config.resources)
)
);
};
};
}