diff --git a/hosts/laptop/variables.nix b/hosts/laptop/variables.nix index 44b5f79..923c230 100644 --- a/hosts/laptop/variables.nix +++ b/hosts/laptop/variables.nix @@ -1,13 +1,19 @@ -{ config, lib, ... }: { +{ + config, + lib, + ... +}: { imports = [ # Choose your theme here: - ../../themes/nixy.nix + ../../themes/catppuccin.nix ]; config.var = { hostname = "nixy"; username = "hadi"; - configDirectory = "/home/" + config.var.username + configDirectory = + "/home/" + + config.var.username + "/.config/nixos"; # The path of the nixos configuration directory keyboardLayout = "fr"; @@ -30,7 +36,7 @@ options = { var = lib.mkOption { type = lib.types.attrs; - default = { }; + default = {}; }; }; } diff --git a/themes/catppuccin.nix b/themes/catppuccin.nix new file mode 100644 index 0000000..7623c72 --- /dev/null +++ b/themes/catppuccin.nix @@ -0,0 +1,91 @@ +{ + lib, + pkgs, + config, + ... +}: { + options.theme = lib.mkOption { + type = lib.types.attrs; + default = { + rounding = 15; + gaps-in = 8; + gaps-out = 8 * 2; + active-opacity = 0.98; + inactive-opacity = 0.94; + blur = true; + border-size = 3; + animation-speed = "fast"; # "fast" | "medium" | "slow" + fetch = "none"; # "nerdfetch" | "neofetch" | "pfetch" | "none" + textColorOnWallpaper = + config.lib.stylix.colors.base05; # Color of the text displayed on the wallpaper (Lockscreen, display manager, ...) + + bar = { + # Hyprpanel + position = "top"; # "top" | "bottom" + transparent = true; + transparentButtons = false; + floating = true; + }; + }; + description = "Theme configuration options"; + }; + + config.stylix = { + enable = true; + + # Mocha + # See https://tinted-theming.github.io/tinted-gallery/ for more schemes + base16Scheme = { + base00 = "0F0F15"; # Default Background + base01 = "15151A"; # Lighter Background (Used for status bars, line number and folding marks) + base02 = "313244"; # Selection Background + base03 = "45475a"; # Comments, Invisibles, Line Highlighting + base04 = "585b70"; # Dark Foreground (Used for status bars) + base05 = "cdd6f4"; # Default Foreground, Caret, Delimiters, Operators + base06 = "f5e0dc"; # Light Foreground (Not often used) + base07 = "b4befe"; # Light Background (Not often used) + base08 = "f38ba8"; # Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted + base09 = "fab387"; # Integers, Boolean, Constants, XML Attributes, Markup Link Url + base0A = "f9e2af"; # Classes, Markup Bold, Search Text Background + base0B = "a6e3a1"; # Strings, Inherited Class, Markup Code, Diff Inserted + base0C = "94e2d5"; # Support, Regular Expressions, Escape Characters, Markup Quotes + base0D = "89b4fa"; # Functions, Methods, Attribute IDs, Headings, Accent color + base0E = "cba6f7"; # Keywords, Storage, Selector, Markup Italic, Diff Changed + base0F = "f2cdcd"; # Deprecated, Opening/Closing Embedded Language Tags, e.g. + }; + + cursor = { + name = "phinger-cursors-light"; + package = pkgs.phinger-cursors; + size = 20; + }; + + fonts = { + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrains Mono Nerd Font"; + }; + sansSerif = { + package = pkgs.source-sans-pro; + name = "Source Sans Pro"; + }; + serif = config.stylix.fonts.sansSerif; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + sizes = { + applications = 13; + desktop = 13; + popups = 13; + terminal = 13; + }; + }; + + polarity = "dark"; + image = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/orangci/walls-catppuccin-mocha/master/cat-vibin.png"; + sha256 = "sha256-Hg27Gp4JBrYIC5B1Uaz8QkUskwD3pBhgEwE1FW7VBYo="; + }; + }; +}