[HACK] simplify out requests arg to make test pass

This commit is contained in:
Kiara Grouwstra 2025-07-19 18:11:40 +02:00
parent 2a18d2e28b
commit e35dc5d3e5
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
2 changed files with 2 additions and 11 deletions

View file

@ -131,7 +131,6 @@ in
_class = "fediversity-environment"; _class = "fediversity-environment";
resources.shell.login-shell.username = "operator"; resources.shell.login-shell.username = "operator";
implementation = implementation =
_requests:
{ ... }: { ... }:
# { providers, ... }: # { providers, ... }:
{ {

View file

@ -138,7 +138,7 @@ in
}; };
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";
type = environment.config.resource-mapping.function-type; # type = environment.config.resource-mapping.output-type;
}; };
resource-mapping = mkOption { resource-mapping = mkOption {
description = "Function type for the mapping from resources to a (NixOps4) deployment"; description = "Function type for the mapping from resources to a (NixOps4) deployment";
@ -159,15 +159,7 @@ in
modules = [ environment.config.resource-mapping.output-type ]; modules = [ environment.config.resource-mapping.output-type ];
}); });
readOnly = true; readOnly = true;
default = default = _cfg: environment.config.implementation;
cfg:
# TODO: check cfg.enable.true
let
required-resources = lib.mapAttrs (
name: application-settings: config.applications.${name}.resources application-settings
) cfg.applications;
in
(environment.config.implementation required-resources).output;
}; };
}; };