refactor: complete rewrite

This commit is contained in:
ooks-io 2024-10-23 23:46:25 +13:00
parent 19a4bbda3c
commit 8e81943cf9
399 changed files with 3396 additions and 8042 deletions

View file

@ -0,0 +1,5 @@
{
imports = [
./options.nix
];
}

View file

@ -0,0 +1,74 @@
{
config,
lib,
...
}: let
inherit (lib) isString hasPrefix removePrefix mkOption mkOptionType;
inherit (lib.types) enum str nullOr package path int attrsOf coercedTo;
hexColorType = mkOptionType {
name = "hex-color";
descriptionClass = "noun";
description = "RGB color in hex format";
check = x: isString x && !(hasPrefix "#" x);
};
mkFontOption = {
family = mkOption {
type = str;
default = "";
};
package = mkOption {
type = package;
default = null;
};
};
cfg = config.ooknet.appearance;
in {
# imports = [./palettes];
options.ooknet.appearance = {
fonts = {
monospace = mkFontOption;
regular = mkFontOption;
};
wallpaper = {
path = mkOption {
type = path;
default = null;
};
};
cursor = {
package = mkOption {
type = package;
default = null;
};
name = mkOption {
type = str;
default = "";
};
size = mkOption {
type = int;
default = 22;
};
};
# Credit to github:misterio77/nix-colors
colorscheme = {
name = mkOption {
type = enum ["gruvbox-material-medium"];
default = "gruvbox-material-medium";
};
variant = mkOption {
type = enum ["dark" "light"];
default = "dark";
};
slug = mkOption {
type = str;
default = "${toString cfg.colorscheme.name}-${toString cfg.colorscheme.variant}";
};
palette = mkOption {
type = attrsOf (coercedTo str (removePrefix "#") hexColorType);
default = (import ./palettes/${config.ooknet.appearance.colorscheme.slug}.nix).colorscheme.palette;
};
};
};
}

View file

@ -0,0 +1,65 @@
{
colorscheme = {
palette = {
crust = "#282828";
mantle = "#32302f";
base = "#3a3735";
surface-0 = "#45403d";
surface-1 = "#504945";
surface-2 = "#5A524C";
overlay-0 = "#696059";
overlay-1 = "#70665C";
overlay-2 = "#7C6F64";
subtext-0 = "#928374";
subtext-1 = "#A89984";
text = "#d4be98";
red = "#ea6962";
dull-red = "#D87974";
bright-red = "#F47771";
orange = "#e78a4e";
dull-orange = "#D39063";
bright-orange = "#F3995E";
yellow = "#d8a657";
dull-yellow = "#c2A16B";
bright-yellow = "#E5B361";
green = "#a9b665";
dull-green = "#989F7A";
bright-green = "#B8C86A";
cyan = "#89b482";
dull-cyan = "#93A790";
bright-cyan = "#92C78A";
blue = "#7daea3";
dull-blue = "#939A98";
bright-blue = "#85C1B4";
purple = "#d3869b";
dull-purple = "#C397A3";
bright-purple = "#E193A8";
base00 = "#282828";
base01 = "#32302f";
base02 = "#504945";
base03 = "#7C6F64";
base04 = "#A89984";
base05 = "#D4BE98";
base06 = "#DDc7a1";
base07 = "#FBF1C7";
base08 = "#EA6962";
base09 = "#E78A4E";
base0A = "#d8a657";
base0B = "#A9B665";
base0C = "#89B482";
base0D = "#7DAEA3";
base0E = "#D3869B";
base0F = "#E37B35";
base10 = "#141617";
base11 = "#050505";
base12 = "#F47771";
base13 = "#D8A657";
base14 = "#B7C86A";
base15 = "#92C78A";
base16 = "#85C1B4";
base17 = "#E193A8";
};
};
}