liminix/pkgs/kernel/write-kconfig.nix
2023-06-26 20:49:43 +01:00

11 lines
240 B
Nix

{
lib
, writeText
}:
name : config: writeText name
(builtins.concatStringsSep
"\n"
(lib.mapAttrsToList
(name: value: (if value == "n" then "# CONFIG_${name} is not set" else "CONFIG_${name}=${value}"))
config
))