2024-04-15 13:55:03 +02:00
|
|
|
{ lib, ... }: {
|
|
|
|
home.file."tokdl-result.txt".text = lib.hm.generators.toKDL { } [
|
|
|
|
{
|
|
|
|
name = "a";
|
|
|
|
args = 1;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "b";
|
|
|
|
args = "string";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "c";
|
|
|
|
args = ''
|
|
|
|
multiline string
|
|
|
|
with special characters:
|
|
|
|
\t \n \" "
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "unsafeString";
|
|
|
|
args = " \" \n ";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "flatItems";
|
|
|
|
args = [ 1 2 "asdf" true null ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "bigFlatItems";
|
|
|
|
args = [
|
|
|
|
23847590283751
|
|
|
|
1.239
|
|
|
|
''
|
|
|
|
multiline " " "
|
|
|
|
string
|
|
|
|
''
|
|
|
|
null
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "repeated";
|
|
|
|
args = [ 1 2 ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "repeated";
|
|
|
|
args = [ true false ];
|
|
|
|
}
|
|
|
|
{ name = "repeated"; }
|
|
|
|
{
|
|
|
|
name = "repeated";
|
|
|
|
args = [ null ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "extraAttrs";
|
|
|
|
args = [ 2 true ];
|
|
|
|
props = {
|
2022-11-21 23:05:02 +01:00
|
|
|
arg1 = 1;
|
|
|
|
arg2 = false;
|
|
|
|
};
|
2024-04-15 13:55:03 +02:00
|
|
|
children = {
|
|
|
|
name = "nested";
|
|
|
|
children = [
|
|
|
|
{
|
|
|
|
name = "a";
|
|
|
|
args = [ 1 ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "b";
|
|
|
|
args = [ null ];
|
|
|
|
}
|
|
|
|
];
|
2022-11-21 23:05:02 +01:00
|
|
|
};
|
2024-04-15 13:55:03 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "listInAttrsInList";
|
|
|
|
children = [
|
|
|
|
{
|
|
|
|
name = "list1";
|
|
|
|
children = [
|
|
|
|
{
|
|
|
|
name = "-";
|
|
|
|
children = {
|
|
|
|
name = "a";
|
|
|
|
args = [ 1 ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "-";
|
|
|
|
children = {
|
|
|
|
name = "b";
|
|
|
|
args = [ true ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "-";
|
|
|
|
children = [
|
|
|
|
{
|
|
|
|
name = "c";
|
|
|
|
args = [ null ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "d";
|
|
|
|
children = {
|
|
|
|
name = "-";
|
|
|
|
children = {
|
|
|
|
name = "e";
|
|
|
|
args = [ "asdfadfasdfasdf" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
2022-11-21 23:05:02 +01:00
|
|
|
{
|
2024-04-15 13:55:03 +02:00
|
|
|
name = "list2";
|
|
|
|
children = [{
|
|
|
|
name = "a";
|
|
|
|
args = [ 8 ];
|
|
|
|
}];
|
2022-11-21 23:05:02 +01:00
|
|
|
}
|
|
|
|
];
|
2024-04-15 13:55:03 +02:00
|
|
|
}
|
|
|
|
];
|
2022-11-21 23:05:02 +01:00
|
|
|
|
|
|
|
nmt.script = ''
|
|
|
|
assertFileContent \
|
2023-11-11 10:19:45 +01:00
|
|
|
home-files/tokdl-result.txt \
|
2022-11-21 23:05:02 +01:00
|
|
|
${./tokdl-result.txt}
|
|
|
|
'';
|
|
|
|
}
|