at master 432 B view raw
1{ lib, config, ... }: 2let 3 inherit (lib) types; 4in 5{ 6 options = { 7 fun = lib.mkOption { 8 type = types.functionTo (types.listOf types.str); 9 }; 10 11 result = lib.mkOption { 12 type = types.str; 13 default = toString ( 14 config.fun { 15 a = "a"; 16 b = "b"; 17 c = "c"; 18 } 19 ); 20 }; 21 }; 22 23 config.fun = lib.mkMerge [ 24 (input: [ input.a ]) 25 (input: [ input.b ]) 26 ]; 27}