home-manager/modules/lib
Josh Robson Chase 7c8bf29df3 generators.toKDL: support repeated nodes, break JiK compat
Replaces the list attr -> KDL conversion logic with a more flexible approach,
allowing for multiple nodes with the same name in a scope. This unfortunately
also breaks the existing JSON-in-KDL semantics in favor of ergonomics. As far
as I can tell though, zellij is the only program using it, and it doesn't accept
JiK anyway.

For example, the following KDL was previously impossible to generate, since nix
attrs were mapped 1:1 to KDL nodes:
```
resize {
	bind "k" "Up" { Resize "Increase Up"; }
	bind "j" "Down" { Resize "Increase Down"; }
}
```

Now, this can be achieved with the nix expression:

```
resize.bind = [
	{ _args = ["k" "Up"]; Resize = "Increase Up"; }
	{ _args = ["j" "Down"]; Resize = "Increase Down"; }
];
```

which would previously have generated the not-very-useful:

```
resize {
	bind {
		- "k" "Up" { Resize "Increase Up"; }
		- "j" "Down" { Resize "Increase Down"; }
	}
}
```

which, in turn, can now be generated via:

```
resize.bind."-" = [
	{ _args = ["k" "Up"]; Resize = "Increase Up"; }
	{ _args = ["j" "Down"]; Resize = "Increase Down"; }
];
```
2024-04-15 08:42:12 -04:00
..
assertions.nix Move platform check into modules 2021-07-18 20:43:22 +02:00
booleans.nix lib.booleans: add yesNo function (#2818) 2022-04-07 22:36:13 -06:00
dag.nix lib: add functions to create DAGs from lists 2023-06-05 23:08:30 +02:00
default.nix lib: add generator for KDL 2023-03-10 16:48:10 +01:00
file-type.nix Remove some formatting exceptions 2024-01-13 19:05:27 +01:00
generators.nix generators.toKDL: support repeated nodes, break JiK compat 2024-04-15 08:42:12 -04:00
gvariant.nix lib: add two new gvariant types 2022-09-29 13:05:51 +02:00
maintainers.nix bun: add module 2024-04-09 20:48:15 +02:00
shell.nix Apply nixfmt on many files 2020-02-02 01:07:28 +01:00
stdlib-extended.nix lib: add fallback for literalExpression and literalDocBook 2021-10-13 00:16:09 +02:00
strings.nix lib: remove top-level with lib 2021-10-31 08:50:53 +01:00
types-dag.nix lib: remove listOrDagOf type 2023-06-05 23:08:29 +02:00
types.nix treewide: remove now-redundant lib.mdDoc calls 2023-07-17 18:49:09 +01:00
zsh.nix Apply nixfmt on many files 2020-02-02 01:07:28 +01:00