forked from fediversity/fediversity
Compare commits
No commits in common. "8ba758bac7ea741e69d273b06312188040a50285" and "4453de5d837d2ee4f292fa304e31f6b3724ed748" have entirely different histories.
8ba758bac7
...
4453de5d83
1 changed files with 11 additions and 6 deletions
|
|
@ -16,6 +16,15 @@ 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 = import ./deployment.nix { inherit inputs; };
|
||||
|
||||
configuration = mkOption {
|
||||
|
|
@ -76,6 +85,7 @@ in
|
|||
{
|
||||
options.apply = mkOption {
|
||||
description = "Apply the policy to a request";
|
||||
type = optionType;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
@ -104,12 +114,7 @@ in
|
|||
};
|
||||
resources = mkOption {
|
||||
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 (
|
||||
attrsOf (
|
||||
attrTag (lib.mapAttrs (_name: resource: mkOption { type = resource.request; }) config.resources)
|
||||
)
|
||||
);
|
||||
type = functionTo (types.submodule application-requirements);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue