lib/tests: More functionTo tests

This commit is contained in:
Silvan Mosberger
2021-01-27 00:17:56 +01:00
parent e9101d4a3b
commit c2f3556dc7
7 changed files with 117 additions and 31 deletions
+17
View File
@@ -0,0 +1,17 @@
{ lib, config, ... }:
let
inherit (lib) types;
in {
options = {
fun = lib.mkOption {
type = types.functionTo types.str;
};
result = lib.mkOption {
type = types.str;
default = config.fun "input";
};
};
config.fun = input: "input is ${input}";
}