chore: build utility functions
This commit is contained in:
parent
e5aef16a97
commit
bd46837713
14
utils/default.nix
Normal file
14
utils/default.nix
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{ 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
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user