Color: Don't generate unnecessary sub-options
This commit is contained in:
@ -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 {
|
||||
@ -72,4 +54,4 @@ in
|
||||
type = types.attrs;
|
||||
description = "Colors belonging to the selected light scheme in '[RR GG BB]' format";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user