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 9d903f3ef7
commit eba943fd7f
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU

View file

@ -99,20 +99,27 @@ in
{
options.enable = lib.mkEnableOption "Hello in the shell";
};
implementation = cfg: {
input = cfg;
output = lib.optionalAttrs cfg.enable {
resources.hello.login-shell.packages.hello = pkgs.hello;
};
implementation = input: fn: {
inherit input;
output =
let
cfg = fn.config.input;
in
lib.optionalAttrs cfg.enable {
resources.hello.login-shell.packages.hello = pkgs.hello;
};
};
};
environments.single-nixos-vm =
{ config, ... }:
{
resources.operator-environment.login-shell.username = "operator";
implementation = requests: {
input = requests;
implementation = input: fn: {
inherit input;
output =
let
requests = fn.config.input;
in
{ providers, ... }:
{
providers = {