Color: Remove unused internal options
This commit is contained in:
@ -5,46 +5,16 @@
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules) color;
|
||||
|
||||
# Options and assignments will be generated from those keys
|
||||
colorKeys = [
|
||||
# Colors
|
||||
"rosewater"
|
||||
"flamingo"
|
||||
"pink"
|
||||
"mauve"
|
||||
"red"
|
||||
"maroon"
|
||||
"peach"
|
||||
"yellow"
|
||||
"green"
|
||||
"teal"
|
||||
"sky"
|
||||
"sapphire"
|
||||
"blue"
|
||||
"lavender"
|
||||
|
||||
# 50 shades of gray
|
||||
"text"
|
||||
"subtext1"
|
||||
"subtext0"
|
||||
"overlay2"
|
||||
"overlay1"
|
||||
"overlay0"
|
||||
"surface2"
|
||||
"surface1"
|
||||
"surface0"
|
||||
"base"
|
||||
"mantle"
|
||||
"crust"
|
||||
];
|
||||
in {
|
||||
options.modules.color = import ./options.nix {inherit lib mylib colorKeys;};
|
||||
options.modules.color = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = let
|
||||
lightDefs = import ./schemes/${color.lightScheme}.nix;
|
||||
darkDefs = import ./schemes/${color.darkScheme}.nix;
|
||||
|
||||
# Assignments will be generated from those keys
|
||||
colorKeys = builtins.attrNames lightDefs;
|
||||
|
||||
mkColorAssignment = defs: key: {${key} = defs.${key};};
|
||||
mkRgbColorAssignment = defs: key: {${key} = mylib.color.hexToRGB defs.${key};};
|
||||
mkRgbStringColorAssignment = defs: key: {${key} = mylib.color.hexToRGBString "," defs.${key};};
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
colorKeys,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
@ -29,13 +28,7 @@ with mylib.modules; {
|
||||
default = "JetBrainsMono Nerd Font Mono";
|
||||
};
|
||||
|
||||
# Internal-only options
|
||||
|
||||
keys = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "The names of all possible colors";
|
||||
default = colorKeys;
|
||||
};
|
||||
# These options will be populated automatically.
|
||||
|
||||
hex = mkOption {
|
||||
type = types.attrs;
|
||||
|
Reference in New Issue
Block a user