properly use modular function application to ensure parameter type-checks

This commit is contained in:
Kiara Grouwstra 2025-08-17 13:21:37 +02:00
parent e83dc97edb
commit 967bb2bcbd
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU

View file

@ -98,20 +98,27 @@ 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 =
resources.hello.login-shell.packages.hello = pkgs.hello; let
}; cfg = fn.config.input;
in
lib.optionalAttrs cfg.enable {
resources.hello.login-shell.packages.hello = pkgs.hello;
};
}; };
}; };
environments.single-nixos-vm = environments.single-nixos-vm =
{ 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 = {