nixfiles/utils/default.nix

15 lines
302 B
Nix
Raw Normal View History

2024-12-03 19:20:09 +00:00
{ lib, ...}:
rec {
_tupleToEntry = x: x.name + (if lib.isBool x.value then "" else (" " + x.value));
attrsToConfig = attrs: (
lib.concatStringsSep "\n" (
map (_tupleToEntry) (
builtins.filter (e: e.value != false) (
lib.attrsToList attrs
)
)
)
);
}