mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
lib: Improve KDL generator (#7429)
This adds support for generating ordered children and nodes with attributes and/or properties but no children. These are both needed to generate zellij keybinding configuration.
This commit is contained in:
parent
ae62fd8ad8
commit
ea24675e4f
3 changed files with 42 additions and 24 deletions
|
|
@ -1,7 +1,12 @@
|
|||
a 1
|
||||
argsAndProps 1 2 a=3
|
||||
b "string"
|
||||
bigFlatItems 23847590283751 1.239000 "multiline \" \" \"\nstring\n" null
|
||||
c "multiline string\nwith special characters:\n\t \n \\" \"\n"
|
||||
duplicateChildren {
|
||||
child 2
|
||||
child 1
|
||||
}
|
||||
extraAttrs 2 true arg1=1 arg2=false {
|
||||
nested {
|
||||
a 1
|
||||
|
|
|
|||
|
|
@ -38,6 +38,10 @@
|
|||
[ ]
|
||||
[ null ]
|
||||
];
|
||||
duplicateChildren._children = [
|
||||
{ child = [ 2 ]; }
|
||||
{ child = [ 1 ]; }
|
||||
];
|
||||
extraAttrs = {
|
||||
_args = [
|
||||
2
|
||||
|
|
@ -52,6 +56,15 @@
|
|||
b = null;
|
||||
};
|
||||
};
|
||||
argsAndProps = {
|
||||
_args = [
|
||||
1
|
||||
2
|
||||
];
|
||||
_props = {
|
||||
a = 3;
|
||||
};
|
||||
};
|
||||
listInAttrsInList = {
|
||||
list1 = [
|
||||
{ a = 1; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue