Compare commits

..

No commits in common. "8ba758bac7ea741e69d273b06312188040a50285" and "4453de5d837d2ee4f292fa304e31f6b3724ed748" have entirely different histories.

View file

@ -16,6 +16,15 @@ let
; ;
functionType = import ./function.nix; 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 = import ./deployment.nix { inherit inputs; }; nixops4Deployment = import ./deployment.nix { inherit inputs; };
configuration = mkOption { configuration = mkOption {
@ -76,6 +85,7 @@ in
{ {
options.apply = mkOption { options.apply = mkOption {
description = "Apply the policy to a request"; description = "Apply the policy to a request";
type = optionType;
}; };
} }
]; ];
@ -104,12 +114,7 @@ in
}; };
resources = mkOption { resources = mkOption {
description = "Mapping of application configuration to deployment resources, a description of what an application needs to run"; description = "Mapping of application configuration to deployment resources, a description of what an application needs to run";
# TODO: maybe transpose, and group the resources by type instead type = functionTo (types.submodule application-requirements);
type = functionTo (
attrsOf (
attrTag (lib.mapAttrs (_name: resource: mkOption { type = resource.request; }) config.resources)
)
);
}; };
}; };
} }