keks
1
Hi all,
I tried understanding the systemd utility functions in nixpkgs and found this code: nixpkgs/systemd-types.nix at 91a3819bad39f4a9d8cba7ee2458fd3adab12195 · NixOS/nixpkgs · GitHub
I am confused that the argument to submodule is a list. The documentation states it should be a function or a set: NixOS 22.05 manual
Could someone elaborate what the code does? Is it just merging the elements of the list and using it as the set?
Thanks!
1 Like
Oh no, the docs are outdated. It does support lists indeed. The semantics are that
types.submodule [ a b c ]
is the same as
types.submodule {
imports = [ a b c ];
}
1 Like
keks
3
Oh, I see! Great, thanks!
keks
4
I submitted a PR. Not sure the wording is great, accepting suggestions.
2 Likes