forked from Fediversity/Fediversity
resolve resource mapping input discrepancy according to actual implementation, adjusting the type accordingly
This commit is contained in:
parent
10a2d29e54
commit
3d94b227d7
1 changed files with 31 additions and 29 deletions
|
@ -26,10 +26,40 @@ let
|
|||
};
|
||||
};
|
||||
nixops4Deployment = import ./deployment.nix { inherit lib inputs; };
|
||||
|
||||
configuration = mkOption {
|
||||
description = "Configuration type declaring options to be set by operators";
|
||||
type = optionType;
|
||||
readOnly = true;
|
||||
default = submoduleWith {
|
||||
class = "fediversity-configuration";
|
||||
modules = [
|
||||
{
|
||||
options = {
|
||||
enable = lib.mkEnableOption {
|
||||
description = "your Fediversity configuration";
|
||||
};
|
||||
applications = lib.mapAttrs (
|
||||
_name: application:
|
||||
mkOption {
|
||||
description = application.description;
|
||||
type = submoduleWith {
|
||||
class = "fediversity-application-config";
|
||||
modules = [ application.module ];
|
||||
};
|
||||
default = { };
|
||||
}
|
||||
) config.applications;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
_class = "fediversity-settings";
|
||||
options = {
|
||||
inherit configuration;
|
||||
resources = mkOption {
|
||||
description = "Collection of deployment resources that can be required by applications and policed by hosting providers";
|
||||
type = attrsOf (submoduleWith {
|
||||
|
@ -131,7 +161,7 @@ in
|
|||
};
|
||||
readOnly = true;
|
||||
default = {
|
||||
input-type = application-requirements;
|
||||
input-type = configuration;
|
||||
output-type = nixops4Deployment;
|
||||
};
|
||||
};
|
||||
|
@ -158,33 +188,5 @@ in
|
|||
];
|
||||
});
|
||||
};
|
||||
configuration = mkOption {
|
||||
description = "Configuration type declaring options to be set by operators";
|
||||
type = optionType;
|
||||
readOnly = true;
|
||||
default = submoduleWith {
|
||||
class = "fediversity-configuration";
|
||||
modules = [
|
||||
{
|
||||
options = {
|
||||
enable = lib.mkEnableOption {
|
||||
description = "your Fediversity configuration";
|
||||
};
|
||||
applications = lib.mapAttrs (
|
||||
_name: application:
|
||||
mkOption {
|
||||
description = application.description;
|
||||
type = submoduleWith {
|
||||
class = "fediversity-application-config";
|
||||
modules = [ application.module ];
|
||||
};
|
||||
default = { };
|
||||
}
|
||||
) config.applications;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue