properly use modular function application to ensure parameter type-checks #13

Closed
kiara wants to merge 1 commit from data-model-check-inputs into deployment-data-model-with-tests
Showing only changes of commit cf29431316 - Show all commits

View file

@ -99,9 +99,13 @@ in
{ {
options.enable = lib.mkEnableOption "Hello in the shell"; options.enable = lib.mkEnableOption "Hello in the shell";
}; };
implementation = cfg: { implementation = input: fn: {
input = cfg; inherit input;
output = lib.optionalAttrs cfg.enable { output =
let
cfg = fn.config.input;
in
lib.optionalAttrs cfg.enable {
resources.hello.login-shell.packages.hello = pkgs.hello; resources.hello.login-shell.packages.hello = pkgs.hello;
}; };
}; };
@ -110,9 +114,12 @@ in
{ config, ... }: { config, ... }:
{ {
resources.operator-environment.login-shell.username = "operator"; resources.operator-environment.login-shell.username = "operator";
implementation = requests: { implementation = input: fn: {
input = requests; inherit input;
output = output =
let
requests = fn.config.input;
in
{ providers, ... }: { providers, ... }:
{ {
providers = { providers = {