at 24.11-pre 288 B view raw
1{ lib, config, ... }: 2let 3 inherit (lib) types; 4in { 5 options = { 6 fun = lib.mkOption { 7 type = types.functionTo types.str; 8 }; 9 10 result = lib.mkOption { 11 type = types.str; 12 default = config.fun "input"; 13 }; 14 }; 15 16 config.fun = input: "input is ${input}"; 17}