added stuff

This commit is contained in:
vali 2024-04-09 23:11:33 +02:00
commit 236b8c2a6b
907 changed files with 70990 additions and 0 deletions

View file

@ -0,0 +1,98 @@
{
config,
lib,
...
}: let
inherit (lib.options) mkOption literalExpression;
inherit (lib.types) str nullOr enum mkOptionType attrsOf coercedTo;
inherit (lib.strings) removePrefix hasPrefix isString;
inherit (lib) serializeTheme;
cfg = config.modules.style;
hexColorType = mkOptionType {
name = "hex-color";
descriptionClass = "noun";
description = "RGB color in hex format";
check = x: isString x && !(hasPrefix "#" x);
};
colorType = attrsOf (coercedTo str (removePrefix "#") hexColorType);
getPaletteFromScheme = slug:
if builtins.pathExists ./palettes/${slug}.nix
then (import ./palettes/${slug}.nix).colorscheme.palette
else throw "The following colorscheme was imported but not found: ${slug}";
in {
options.modules.style = {
# choose a colorscheme
colorScheme = {
# "Name Of The Scheme"
name = mkOption {
type = nullOr (enum ["Catppuccin Mocha" "Tokyonight Storm" "Oxocarbon Dark"]);
description = "The colorscheme that should be used globally to theme your system.";
default = "Catppuccin Mocha";
};
# "name-of-the-scheme"
slug = mkOption {
type = str;
default = serializeTheme "${toString cfg.colorScheme.name}"; # toString to avoid type errors if null, returns ""
description = ''
The serialized slug for the colorScheme you are using.
Defaults to a lowercased version of the theme name with spaces
replaced with hyphens.
Must only be changed if the slug is expected to be different than
the serialized theme name."
'';
};
# this module option is taken from nix-colors by Misterio77
# and is adapted for my personal use. Main difference is that
# certain additional options (e.g. author or palette) have been
# removed as they are handled by the rest of the style module.
# <https://github.com/Misterio77/nix-colors/blob/main/module/colorscheme.nix>
colors = mkOption {
type = colorType;
default = getPaletteFromScheme cfg.colorScheme.slug;
description = ''
An attribute set containing active colors of the system. Follows base16
scheme by default but can be expanded to base24 or anything "above" as
seen fit as the module option is actually not checked in any way
'';
example = literalExpression ''
{
base00 = "#002635";
base01 = "#00384d";
base02 = "#517F8D";
base03 = "#6C8B91";
base04 = "#869696";
base05 = "#a1a19a";
base06 = "#e6e6dc";
base07 = "#fafaf8";
base08 = "#ff5a67";
base09 = "#f08e48";
base0A = "#ffcc1b";
base0B = "#7fc06e";
base0C = "#14747e";
base0D = "#5dd7b9";
base0E = "#9a70a4";
base0F = "#c43060";
}
'';
};
variant = mkOption {
type = enum ["dark" "light"];
default =
if builtins.substring 0 1 cfg.colorScheme.colors.base00 < "5"
then "dark"
else "light";
description = ''
Whether the scheme is dark or light
'';
};
};
};
}

View file

@ -0,0 +1,44 @@
{
pkgs,
lib,
...
}: let
inherit (lib) mkOption mkEnableOption types;
in {
imports = [
./gtk.nix
./qt.nix
./colors.nix
];
options.modules.style = {
forceGtk = mkEnableOption "Force GTK applications to use the GTK theme";
useKvantum = mkEnableOption "Use Kvantum to theme QT applications";
pointerCursor = {
package = mkOption {
type = types.package;
description = "The package providing the cursors";
default = pkgs.catppuccin-cursors.mochaDark;
};
name = mkOption {
type = types.str;
description = "The name of the cursor inside the package";
default = "Catppuccin-Mocha-Dark-Cursors";
};
size = mkOption {
type = types.int;
description = "The size of the cursor";
default = 24;
};
};
wallpapers = mkOption {
type = with types; either str (listOf str);
description = "Wallpaper or wallpapers to use";
default = [];
};
};
}

View file

@ -0,0 +1,70 @@
{
lib,
pkgs,
...
}: let
inherit (lib) mkOption mkEnableOption types;
in {
options = {
modules = {
style = {
# gtk specific options
gtk = {
enable = mkEnableOption "GTK theming optionss";
usePortal = mkEnableOption "native desktop portal use for filepickers";
theme = {
name = mkOption {
type = types.str;
default = "Catppuccin-Mocha-Standard-Blue-dark";
description = "The name for the GTK theme package";
};
package = mkOption {
type = types.package;
description = "The theme package to be used for GTK programs";
default = pkgs.catppuccin-gtk.override {
size = "standard";
accents = ["blue"];
variant = "mocha";
tweaks = ["normal"];
};
};
};
iconTheme = {
name = mkOption {
type = types.str;
description = "The name for the icon theme that will be used for GTK programs";
default = "Papirus-Dark";
};
package = mkOption {
type = types.package;
description = "The GTK icon theme to be used";
default = pkgs.catppuccin-papirus-folders.override {
accent = "blue";
flavor = "mocha";
};
};
};
font = {
name = mkOption {
type = types.str;
description = "The name of the font that will be used for GTK applications";
default = "Lexend";
};
size = mkOption {
type = types.int;
description = "The size of the font";
default = 14;
};
};
};
};
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "angel-light";
name = "Angel";
variant = "light";
palette = {
base00 = "#140e10";
base01 = "#8E7C86";
base02 = "#C47E81";
base03 = "#988791";
base04 = "#AB9196";
base05 = "#B39BA8";
base06 = "#CEA6A9";
base07 = "#e2d4d8";
base08 = "#9e9497";
base09 = "#8E7C86";
base0A = "#C47E81";
base0B = "#988791";
base0C = "#AB9196";
base0D = "#B39BA8";
base0E = "#CEA6A9";
base0F = "#e2d4d8";
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "black-metal";
name = "Black Metal";
variant = "dark";
palette = {
base00 = "#000000";
base01 = "#121212";
base02 = "#222222";
base03 = "#333333";
base04 = "#999999";
base05 = "#c1c1c1";
base06 = "#999999";
base07 = "#c1c1c1";
base08 = "#5f8787";
base09 = "#aaaaaa";
base0A = "#a06666";
base0B = "#dd9999";
base0C = "#aaaaaa";
base0D = "#888888";
base0E = "#999999";
base0F = "#444444";
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "carbon-dark";
name = "Carbon Dark";
variant = "dark";
valette = {
base00 = "#161616";
base01 = "#262626";
base02 = "#393939";
base03 = "#525252";
base04 = "#6F6F6F";
base05 = "#FAFAFA";
base06 = "#FAFAFA";
base07 = "#FFFFFF";
base08 = "#be95ff";
base09 = "#3ddbd9";
base0A = "#0043ce";
base0B = "#33b1ff";
base0C = "#ff7eb6";
base0D = "#42be65";
base0E = "#be95ff";
base0F = "#3ddbd9";
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "catppuccin-frappe";
name = "Catppuccin Frappe";
variant = "dark";
palette = {
base00 = "#303446"; # Base
base01 = "#292c3c"; # Mantle
base02 = "#414559"; # Surface0
base03 = "#51576d"; # Surface1
base04 = "#626880"; # Surface2
base05 = "#c6d0f5"; # Text
base06 = "#f2d5cf"; # Rosewater
base07 = "#babbf1"; # Lavender
base08 = "#e78284"; # Red
base09 = "#ef9f76"; # Peach
base0A = "#e5c890"; # Yellow
base0B = "#a6d189"; # Green
base0C = "#81c8be"; # Teal
base0D = "#8caaee"; # Blue
base0E = "#ca9ee6"; # Mauve
base0F = "#eebebe"; # Flamingo
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "catppuccin-mocha";
name = "Catppuccin Mocha";
variant = "dark";
palette = {
base00 = "#24273a"; # Base
base01 = "#1e2030"; # Mantle
base02 = "#363a4f"; # Surface0
base03 = "#494d64"; # Surface1
base04 = "#5b6078"; # Surface2
base05 = "#cad3f5"; # Text
base06 = "#f4dbd6"; # Rosewater
base07 = "#b7bdf8"; # Lavender
base08 = "#ed8796"; # Red
base09 = "#f5a97f"; # Peach
base0A = "#eed49f"; # Yellow
base0B = "#a6da95"; # Green
base0C = "#8bd5ca"; # Teal
base0D = "#8aadf4"; # Blue
base0E = "#c5a0f6"; # Mauve
base0F = "#f0c6c6"; # Flamingo
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "catppuccin-mocha";
name = "Catppuccin Mocha";
variant = "dark";
palette = {
base00 = "#1e1e2e"; # Base
base01 = "#181825"; # Mantle
base02 = "#313244"; # Surface0
base03 = "#45475a"; # Surface1
base04 = "#585b70"; # Surface2
base05 = "#cdd6f4"; # text
base06 = "#f5e0dc"; # rosewater
base07 = "#b4befe"; # lavender
base08 = "#f38ba8"; # red
base09 = "#fab387"; # peach
base0A = "#a6e3a1"; # yellow
base0B = "#94e2d5"; # green
base0C = "#94e2d5"; # teal
base0D = "#89b4fa"; # blue
base0E = "#cba6f7"; # mauve
base0F = "#f2cdcd"; # flamingo
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "decay-dark";
name = "Decay Dark";
variant = "dark";
palette = {
base00 = "#10101a"; # Base
base01 = "#12121c"; # Mantle
base02 = "#171721"; # Surface0
base03 = "#1c1c26"; # Surface1
base04 = "#2b2b35"; # Surface2
base05 = "#c3cddb"; # text
base06 = "#c3cddb"; # "
base07 = "#c8d2e0"; # white
base08 = "#c8d2e0"; # "
base09 = "#fa9a9a"; # red
base0A = "#f8e7b7"; # yellow
base0B = "#b0e2ae"; # green
base0C = "#93cff7"; # teal
base0D = "#8cbef7"; # blue
base0E = "#bfa6fa"; # magenta
base0F = "#fa9a9a"; # red again
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "default-dark";
name = "Default Dark";
variant = "dark";
palette = {
base00 = "#181818";
base01 = "#282828";
base02 = "#383838";
base03 = "#585858";
base04 = "#b8b8b8";
base05 = "#d8d8d8";
base06 = "#e8e8e8";
base07 = "#f8f8f8";
base08 = "#ab4642";
base09 = "#dc9656";
base0A = "#f7ca88";
base0B = "#a1b56c";
base0C = "#86c1b9";
base0D = "#7cafc2";
base0E = "#ba8baf";
base0F = "#a16946";
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "monochrome";
name = "monochrome";
variant = "dark";
palette = {
base00 = "#121517"; # Base
base01 = "#2e3338"; # Mantle
base02 = "#4a5159"; # Surface0
base03 = "#6c757d"; # Surface1
base04 = "#6c757d"; # Surface2
base05 = "#e9ecef"; # text
base06 = "#e9ecef"; # "
base07 = "#f8f9fa"; # white
base08 = "#f8f9fa"; # white
base09 = "#f8f9fa"; # white
base0A = "#f8f9fa"; # white
base0B = "#f8f9fa"; # white
base0C = "#f8f9fa"; # white
base0D = "#f8f9fa"; # white
base0E = "#f8f9fa"; # white
base0F = "#f8f9fa"; # white
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "noelle";
name = "noelle";
variant = "dark";
palette = {
base00 = "#111111"; # Base
base01 = "#282a2e"; # Mantle
base02 = "#373b41"; # Surface0
base03 = "#373b41"; # Surface1
base04 = "#626880"; # Surface2
base05 = "#eae7ee"; # Text
base06 = "#c5c8c6"; # Rosewater
base07 = "#c6c8c6"; # Lavender
base08 = "#922b3c"; # Red
base09 = "#a84757"; # Peach
base0A = "#bd8964"; # Yellow
base0B = "#a3ad64"; # Green
base0C = "#922b3c"; # Teal
base0D = "#a84757"; # Blue
base0E = "#9876a4"; # Magenta
base0F = "#ae93b7"; # Flamingo
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "oxocarbon-dark";
name = "Oxocarbon Dark";
variant = "dark";
palette = {
base00 = "#161616";
base01 = "#262626";
base02 = "#393939";
base03 = "#525252";
base04 = "#dde1e6";
base05 = "#f2f4f8";
base06 = "#ffffff";
base07 = "#08bdba";
base08 = "#3ddbd9";
base09 = "#78a9ff";
base0A = "#ee5396";
base0B = "#33b1ff";
base0C = "#ff7eb6";
base0D = "#42be65";
base0E = "#be95ff";
base0F = "#82cfff";
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "tokyo-night";
name = "Tokyo Night";
variant = "dark"; # bet
palette = {
base00 = "#24283b";
base01 = "#1f2335";
base02 = "#292e42";
base03 = "#565f89";
base04 = "#a9b1d6";
base05 = "#c0caf5";
base06 = "#c0caf5";
base07 = "#c0caf5";
base08 = "#c0caf5";
base09 = "#f7768e";
base0A = "#e0af68";
base0B = "#9ece6a";
base0C = "#1abc9c";
base0D = "#41a6b5";
base0E = "#bb9af7";
base0F = "#ff007c";
};
};
}

View file

@ -0,0 +1,25 @@
{
colorscheme = {
slug = "varda-theme";
name = "Varda Theme";
variant = "dark";
palette = {
base00 = "#0C0E11"; # Base
base01 = "#141619"; # Mantle
base02 = "#2E3436"; # Surface0
base03 = "#3b4444"; # Surface1
base04 = "#3b4444"; # Surface2
base05 = "#D0EBEE"; # text
base06 = "#D0EBEE"; # "
base07 = "#E5FFFF"; # white
base08 = "#E5FFFF"; # "
base09 = "#733447"; # red
base0A = "#C78C56"; # yellow
base0B = "#257B76"; # green
base0C = "#52677C"; # teal
base0D = "#52677C"; # blue
base0E = "#604575"; # magenta
base0F = "#733447"; # red again
};
};
}

View file

@ -0,0 +1,43 @@
{
lib,
pkgs,
config,
...
}: let
inherit (lib) mkOption types mkEnableOption;
cfg = config.modules.style;
in {
options = {
modules = {
style = {
qt = {
enable = mkEnableOption "QT Style Module";
theme = {
package = mkOption {
type = types.package;
default = pkgs.catppuccin-kde.override {
flavour = ["mocha"];
accents = ["blue"];
winDecStyles = ["modern"];
};
description = "The theme package to be used for QT programs";
};
name = mkOption {
type = types.str;
default = "Catppuccin-Mocha-Dark";
description = "The name for the QT theme package";
};
};
kdeglobals.source = mkOption {
type = types.path;
default = "${cfg.qt.theme.package}/share/color-schemes/CatppuccinMochaBlue.colors";
description = "The source file for the kdeglobals file. Usually provided by the qt theme package";
};
};
};
};
};
}