1

Color: Remove unused internal options

This commit is contained in:
2024-10-14 20:38:45 +02:00
parent b434994994
commit 72b3f244e2
2 changed files with 5 additions and 42 deletions

View File

@ -5,46 +5,16 @@
... ...
}: let }: let
inherit (config.modules) color; 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 { in {
options.modules.color = import ./options.nix {inherit lib mylib colorKeys;}; options.modules.color = import ./options.nix {inherit lib mylib;};
config = let config = let
lightDefs = import ./schemes/${color.lightScheme}.nix; lightDefs = import ./schemes/${color.lightScheme}.nix;
darkDefs = import ./schemes/${color.darkScheme}.nix; darkDefs = import ./schemes/${color.darkScheme}.nix;
# Assignments will be generated from those keys
colorKeys = builtins.attrNames lightDefs;
mkColorAssignment = defs: key: {${key} = defs.${key};}; mkColorAssignment = defs: key: {${key} = defs.${key};};
mkRgbColorAssignment = defs: key: {${key} = mylib.color.hexToRGB defs.${key};}; mkRgbColorAssignment = defs: key: {${key} = mylib.color.hexToRGB defs.${key};};
mkRgbStringColorAssignment = defs: key: {${key} = mylib.color.hexToRGBString "," defs.${key};}; mkRgbStringColorAssignment = defs: key: {${key} = mylib.color.hexToRGBString "," defs.${key};};

View File

@ -1,7 +1,6 @@
{ {
lib, lib,
mylib, mylib,
colorKeys,
... ...
}: }:
with lib; with lib;
@ -29,13 +28,7 @@ with mylib.modules; {
default = "JetBrainsMono Nerd Font Mono"; default = "JetBrainsMono Nerd Font Mono";
}; };
# Internal-only options # These options will be populated automatically.
keys = mkOption {
type = types.listOf types.str;
description = "The names of all possible colors";
default = colorKeys;
};
hex = mkOption { hex = mkOption {
type = types.attrs; type = types.attrs;