forked from Fediversity/Fediversity
properly use modular function application to ensure parameter type-checks
This commit is contained in:
parent
e83dc97edb
commit
967bb2bcbd
1 changed files with 14 additions and 7 deletions
|
@ -98,20 +98,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 = {
|
||||
|
|
Loading…
Add table
Reference in a new issue