2022-06-21 01:47:36 +02:00
|
|
|
{ pkgs, lib, config, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.colors;
|
|
|
|
inherit (lib) types mkOption;
|
|
|
|
in {
|
2022-08-16 03:24:06 +02:00
|
|
|
options.colors = let
|
2022-06-21 01:47:36 +02:00
|
|
|
colorType = types.str;
|
|
|
|
|
|
|
|
mkColorOption = mkOption {
|
|
|
|
type = colorType;
|
|
|
|
};
|
|
|
|
|
|
|
|
colorSetType = types.submodule ({ name, ... }: {
|
2022-08-16 03:24:06 +02:00
|
|
|
options = {
|
|
|
|
name = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = name;
|
|
|
|
};
|
|
|
|
foreground = mkColorOption;
|
|
|
|
background = mkColorOption;
|
|
|
|
black = mkColorOption;
|
|
|
|
red = mkColorOption;
|
|
|
|
green = mkColorOption;
|
|
|
|
yellow = mkColorOption;
|
|
|
|
blue = mkColorOption;
|
|
|
|
magenta = mkColorOption;
|
|
|
|
cyan = mkColorOption;
|
|
|
|
white = mkColorOption;
|
2022-06-21 01:47:36 +02:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
in {
|
|
|
|
colorSets = mkOption {
|
2022-08-16 03:24:06 +02:00
|
|
|
type = types.attrsOf colorSetType;
|
2022-06-21 01:47:36 +02:00
|
|
|
};
|
|
|
|
defaultColorSet = mkOption {
|
|
|
|
description = "the default color to use for applications";
|
|
|
|
type = colorSetType;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-08-16 03:24:06 +02:00
|
|
|
config.colors = rec {
|
|
|
|
colorSets = {
|
2022-06-21 01:47:36 +02:00
|
|
|
monokai = rec {
|
|
|
|
foreground = white;
|
|
|
|
background = black;
|
|
|
|
black = "#272822";
|
|
|
|
red = "#f92672";
|
|
|
|
green = "#a6e22e";
|
|
|
|
yellow = "#f4bf75";
|
|
|
|
blue = "#66d9ef";
|
|
|
|
magenta = "#ae81ff";
|
|
|
|
cyan = "#a1efe4";
|
|
|
|
white = "#f8f8f2";
|
|
|
|
};
|
|
|
|
|
|
|
|
paper = {
|
|
|
|
background = "#f2e3bd";
|
|
|
|
foreground = "#2f343f";
|
|
|
|
black = "#222222";
|
|
|
|
red = "#C30771";
|
|
|
|
green = "#10A778";
|
|
|
|
yellow = "#A89C14";
|
|
|
|
blue = "#008ec4";
|
|
|
|
magenta = "#523C79";
|
|
|
|
cyan = "#20A5BA";
|
|
|
|
white = "#f7f3ee";
|
|
|
|
};
|
|
|
|
};
|
2022-08-16 03:24:06 +02:00
|
|
|
defaultColorSet = colorSets.monokai;
|
2022-06-21 01:47:36 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|