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