nixfiles/utils/default.nix

15 lines
302 B
Nix

{ 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
)
)
)
);
}