forked from Fediversity/Fediversity
repro username type error, and WIP fix
This commit is contained in:
parent
1b898264e4
commit
8f8432bc50
1 changed files with 22 additions and 18 deletions
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
options,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -149,24 +150,27 @@ in
|
||||||
Setting this is optional, but provides a place to declare that information for programmatic use in the resource mapping.
|
Setting this is optional, but provides a place to declare that information for programmatic use in the resource mapping.
|
||||||
'';
|
'';
|
||||||
# TODO: maybe transpose, and group the resources by type instead
|
# TODO: maybe transpose, and group the resources by type instead
|
||||||
# # FIXME: error: The option `environments.single-nixos-vm.resources.shell.login-shell.apply' does not exist. Definition values:
|
type = attrsOf (
|
||||||
# # - In `<unknown-file>': <function>
|
attrTag (
|
||||||
# # However there are no options defined in `environments.single-nixos-vm.resources.shell.login-shell'. Are you sure you've
|
lib.mapAttrs (
|
||||||
# # declared your options properly? This can happen if you e.g. declared your options in `types.submodule'
|
name: resource:
|
||||||
# # under `config' rather than `options'.
|
mkOption {
|
||||||
# type = attrsOf (
|
type = submoduleWith {
|
||||||
# attrTag (
|
class = "fediversity-resource-policy";
|
||||||
# lib.mapAttrs (
|
modules =
|
||||||
# _name: resource:
|
(lib.evalModules {
|
||||||
# mkOption {
|
modules =
|
||||||
# type = submoduleWith {
|
options.resources.type.nestedTypes.elemType.getSubModules
|
||||||
# class = "fediversity-resource-policy";
|
;
|
||||||
# modules = [ resource.policy ];
|
}).options.policy.type.getSubModules
|
||||||
# };
|
++ [
|
||||||
# }
|
options.resources.value.${name}
|
||||||
# ) config.resources
|
];
|
||||||
# )
|
};
|
||||||
# );
|
}
|
||||||
|
) config.resources
|
||||||
|
)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
implementation = mkOption {
|
implementation = mkOption {
|
||||||
description = "Mapping of resources required by applications to available resources; the result can be deployed";
|
description = "Mapping of resources required by applications to available resources; the result can be deployed";
|
||||||
|
|
Loading…
Add table
Reference in a new issue