refactor rice into config

This commit is contained in:
atagen 2025-07-21 12:26:28 +10:00
parent 8872a12d20
commit 818af30329
64 changed files with 229 additions and 230 deletions

55
common/rice/default.nix Normal file
View file

@ -0,0 +1,55 @@
{
lib,
inputs,
...
}:
let
nix-rice = import "${inputs.nix-rice}/lib.nix" {
inherit lib;
kitty-themes-src = { };
};
inherit (nix-rice) kitty-themes;
inherit (nix-rice.palette) toRGBShortHex toRGBHex;
theme = kitty-themes.parseTheme ./pal.conf;
in
{
options.rice = lib.mkOption {
description = "ricing related variables";
default = { };
type = lib.types.attrsOf lib.types.anything;
};
config.rice = rec {
palette = theme // {
normal = {
black = theme.color0;
red = theme.color1;
green = theme.color2;
yellow = theme.color3;
blue = theme.color4;
magenta = theme.color5;
cyan = theme.color6;
white = theme.color7;
};
bright = {
black = theme.color8;
red = theme.color9;
green = theme.color10;
yellow = theme.color11;
blue = theme.color12;
magenta = theme.color13;
cyan = theme.color14;
white = theme.color15;
};
util = {
fg = theme.foreground;
bg = theme.background;
fg_sel = theme.selection_foreground;
bg_sel = theme.selection_background;
inherit (theme) cursor;
# url = theme.url_color;
};
hex = toRGBHex palette;
shortHex = toRGBShortHex palette;
};
};
}