core/lib/tests/modules/functionTo/trivial.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
278 B
Nix
Raw Normal View History

2024-05-01 22:14:04 +00:00
{ 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}";
}