1

Color: Don't generate unnecessary sub-options

This commit is contained in:
2024-10-14 20:29:23 +02:00
parent 506a2b833a
commit 0a39fe41f9

View File

@ -5,25 +5,7 @@
...
}:
with lib;
with mylib.modules; let
mkColorOption = key: {
light.${key} = mkOption {
type = types.str;
description = "The RGB hex color value for ${key} in the light scheme";
example = "EEEEEE";
};
dark.${key} = mkOption {
type = types.str;
description = "The RGB hex color value for ${key} in the dark scheme";
example = "111111";
};
};
in
(lib.pipe colorKeys [
(builtins.map mkColorOption)
lib.mergeAttrsList
])
// {
with mylib.modules; {
enable = mkEnableOption "Enable color schemes";
lightScheme = mkOption {