diff --git a/apps/neovim.nix b/apps/neovim.nix index 60fd389..c944af9 100644 --- a/apps/neovim.nix +++ b/apps/neovim.nix @@ -5,8 +5,7 @@ program = "${ (import ../modules/common/neovim/package { inherit pkgs; - colors = - import ../colorscheme/gruvbox/neovim-gruvbox.nix { inherit pkgs; }; + colors = (import ../colorscheme/gruvbox).dark; }) }/bin/nvim"; diff --git a/colorscheme/gruvbox-dark/default.nix b/colorscheme/gruvbox-dark/default.nix new file mode 100644 index 0000000..d8d84ef --- /dev/null +++ b/colorscheme/gruvbox-dark/default.nix @@ -0,0 +1,45 @@ +# Gruvbox with a darker background for greater contrast + +{ + name = "gruvbox-dark"; # Dark, Medium + author = + "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox), ElRastaOk (https://www.reddit.com/user/ElRastaOk)"; + dark = { + base00 = "#1D2122"; # ---- This is the change from normal gruvbox + base01 = "#3c3836"; # --- + base02 = "#504945"; # -- + base03 = "#665c54"; # - + base04 = "#bdae93"; # + + base05 = "#d5c4a1"; # ++ + base06 = "#ebdbb2"; # +++ + base07 = "#fbf1c7"; # ++++ + base08 = "#fb4934"; # red + base09 = "#fe8019"; # orange + base0A = "#fabd2f"; # yellow + base0B = "#b8bb26"; # green + base0C = "#8ec07c"; # aqua/cyan + base0D = "#83a598"; # blue + base0E = "#d3869b"; # purple + base0F = "#d65d0e"; # brown + batTheme = "gruvbox-dark"; + }; + light = { + base00 = "#fbf1c7"; # ---- + base01 = "#ebdbb2"; # --- + base02 = "#d5c4a1"; # -- + base03 = "#bdae93"; # - + base04 = "#665c54"; # + + base05 = "#504945"; # ++ + base06 = "#3c3836"; # +++ + base07 = "#1D2122"; # ++++ Adjusted darker here + base08 = "#9d0006"; # red + base09 = "#af3a03"; # orange + base0A = "#b57614"; # yellow + base0B = "#79740e"; # green + base0C = "#427b58"; # aqua/cyan + base0D = "#076678"; # blue + base0E = "#8f3f71"; # purple + base0F = "#d65d0e"; # brown + batTheme = "gruvbox-light"; + }; +} diff --git a/colorscheme/gruvbox/default.nix b/colorscheme/gruvbox/default.nix index 43bec39..945ba49 100644 --- a/colorscheme/gruvbox/default.nix +++ b/colorscheme/gruvbox/default.nix @@ -19,7 +19,6 @@ base0D = "#83a598"; # blue base0E = "#d3869b"; # purple base0F = "#d65d0e"; # brown - neovimConfig = ./neovim-gruvbox.nix; batTheme = "gruvbox-dark"; }; light = { @@ -39,7 +38,6 @@ base0D = "#076678"; # blue base0E = "#8f3f71"; # purple base0F = "#d65d0e"; # brown - neovimConfig = ./neovim-gruvbox.nix; batTheme = "gruvbox-light"; }; } diff --git a/colorscheme/gruvbox/neovim-gruvbox.nix b/colorscheme/gruvbox/neovim-gruvbox.nix deleted file mode 100644 index 9e46ff8..0000000 --- a/colorscheme/gruvbox/neovim-gruvbox.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, ... }: { - - plugins = [ pkgs.vimPlugins.vim-gruvbox8 ]; - - vim.g.gruvbox_italicize_strings = 0; - vim.o.background = "dark"; - vimscript = '' - let g:gruvbox_italicize_strings = 0 - colorscheme gruvbox8 - ''; - -} diff --git a/colorscheme/nord/default.nix b/colorscheme/nord/default.nix index 5b8586b..99f711d 100644 --- a/colorscheme/nord/default.nix +++ b/colorscheme/nord/default.nix @@ -1,21 +1,23 @@ { - name = "nord"; - author = "arcticicestudio"; - base00 = "#2E3440"; - base01 = "#3B4252"; - base02 = "#434C5E"; - base03 = "#4C566A"; - base04 = "#D8DEE9"; - base05 = "#E5E9F0"; - base06 = "#ECEFF4"; - base07 = "#8FBCBB"; - base08 = "#88C0D0"; - base09 = "#81A1C1"; - base0A = "#5E81AC"; - base0B = "#BF616A"; - base0C = "#D08770"; - base0D = "#EBCB8B"; - base0E = "#A3BE8C"; - base0F = "#B48EAD"; - neovimConfig = ./neovim.lua; + dark = { + name = "nord"; + author = "arcticicestudio"; + base00 = "#2E3440"; + base01 = "#3B4252"; + base02 = "#434C5E"; + base03 = "#4C566A"; + base04 = "#D8DEE9"; + base05 = "#E5E9F0"; + base06 = "#ECEFF4"; + base07 = "#8FBCBB"; + base08 = "#88C0D0"; + base09 = "#81A1C1"; + base0A = "#5E81AC"; + base0B = "#BF616A"; + base0C = "#D08770"; + base0D = "#EBCB8B"; + base0E = "#A3BE8C"; + base0F = "#B48EAD"; + batTheme = "nord"; + }; } diff --git a/flake.nix b/flake.nix index c483b83..8a08a86 100644 --- a/flake.nix +++ b/flake.nix @@ -180,8 +180,7 @@ neovim = let pkgs = import nixpkgs { inherit system overlays; }; in import ./modules/common/neovim/package { inherit pkgs; - colors = - import ./colorscheme/gruvbox/neovim-gruvbox.nix { inherit pkgs; }; + colors = (import ./colorscheme/gruvbox-dark).dark; }; }); diff --git a/hosts/tempest/default.nix b/hosts/tempest/default.nix index 1d044f7..6bd1624 100644 --- a/hosts/tempest/default.nix +++ b/hosts/tempest/default.nix @@ -26,7 +26,7 @@ nixpkgs.lib.nixosSystem { # Theming theme = { - colors = (import ../../colorscheme/gruvbox).dark; + colors = (import ../../colorscheme/gruvbox-dark).dark; dark = true; }; wallpaper = "${wallpapers}/gruvbox/road.jpg"; diff --git a/modules/common/neovim/config/colors.nix b/modules/common/neovim/config/colors.nix new file mode 100644 index 0000000..879ad50 --- /dev/null +++ b/modules/common/neovim/config/colors.nix @@ -0,0 +1,13 @@ +{ pkgs, lib, config, ... }: { + + options.colors = lib.mkOption { + type = lib.types.attrsOf lib.types.str; + description = "Attrset of base16 colorscheme key value pairs."; + }; + + config = { + plugins = [ pkgs.vimPlugins.nvim-base16 ]; + setup.base16-colorscheme = config.colors; + }; + +} diff --git a/modules/common/neovim/default.nix b/modules/common/neovim/default.nix index 03b1c89..c5d0825 100644 --- a/modules/common/neovim/default.nix +++ b/modules/common/neovim/default.nix @@ -4,7 +4,7 @@ let neovim = import ./package { inherit pkgs; - colors = import config.theme.colors.neovimConfig { inherit pkgs; }; + colors = config.theme.colors; }; in { diff --git a/modules/common/neovim/package/default.nix b/modules/common/neovim/package/default.nix index a39767f..a444654 100644 --- a/modules/common/neovim/package/default.nix +++ b/modules/common/neovim/package/default.nix @@ -26,13 +26,15 @@ # ] ++ extraConfig; # } -{ pkgs, colors ? { }, ... }: +{ pkgs, colors, ... }: pkgs.neovimBuilder { package = pkgs.neovim-unwrapped; + inherit colors; imports = [ ../config/align.nix ../config/bufferline.nix + ../config/colors.nix ../config/completion.nix ../config/gitsigns.nix ../config/lsp.nix @@ -42,6 +44,5 @@ pkgs.neovimBuilder { ../config/telescope.nix ../config/toggleterm.nix ../config/tree.nix - colors ]; }