diff options
| author | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-04-07 15:24:01 -0400 |
|---|---|---|
| committer | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-04-07 15:24:01 -0400 |
| commit | 993ee553170d01d3d0e7bcef7afc05b80f15b10a (patch) | |
| tree | 261833dccfca4c76337740707e3cc8ee7e5de7fa | |
| parent | 52666e5590a4c24d1085c242918398b9e1be741a (diff) | |
| download | home-993ee553170d01d3d0e7bcef7afc05b80f15b10a.tar.gz | |
imporve colors module
| -rw-r--r-- | modules/colors/default.nix | 6 | ||||
| -rw-r--r-- | modules/colors/mountain.nix | 65 | ||||
| -rw-r--r-- | modules/default.nix | 3 | ||||
| -rw-r--r-- | modules/mountain.nix | 35 | ||||
| -rw-r--r-- | modules/neovim/default.nix | 7 | ||||
| -rw-r--r-- | modules/neovim/nvim/init.lua | 2 | ||||
| -rw-r--r-- | modules/scheme/default.nix | 43 | ||||
| -rw-r--r-- | void/home.nix | 2 |
8 files changed, 95 insertions, 68 deletions
diff --git a/modules/colors/default.nix b/modules/colors/default.nix new file mode 100644 index 0000000..07e47d4 --- /dev/null +++ b/modules/colors/default.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ./mountain.nix + ]; +} diff --git a/modules/colors/mountain.nix b/modules/colors/mountain.nix new file mode 100644 index 0000000..1ff13c1 --- /dev/null +++ b/modules/colors/mountain.nix @@ -0,0 +1,65 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.modules.colors.mountain; + hexColorRegex = ''#([0-9a-fA-F]{3}){1,2}''; + hexColor = { + type = lib.types.strMatching hexColorRegex; + }; +in +{ + options.modules.colors.mountain = { + enable = lib.mkEnableOption "mountain theme"; + }; + + config = lib.mkIf cfg.enable { + modules.scheme = { + name = "base16-mountain"; + base00 = "#0f0f0f"; + base01 = "#191919"; + base02 = "#262626"; + base03 = "#4c4c4c"; + base04 = "#ac8a8c"; + base05 = "#cacaca"; + base06 = "#e7e7e7"; + base07 = "#f0f0f0"; + base08 = "#ac8a8c"; + base09 = "#ceb188"; + base0A = "#aca98a"; + base0B = "#8aac8b"; + base0C = "#8aabac"; + base0D = "#8f8aac"; + base0E = "#ac8aac"; + base0F = "#ac8a8c"; + extraVimConfig = + '' + hi LineNr guifg=#ceb188 + hi LineNrAbove guifg=#262626 + hi LineNrBelow guifg=#262626 + hi CursorLineNr guifg=#ceb188 guibg=#191919 gui=bold + hi FloatBorder guifg=#4c4c4c + hi Pmenu guibg=#0d0d0d + hi BlinkCmpMenuBorder guifg=#4c4c4c + hi BlinkCmpDocBorder guifg=#4c4c4c + hi PmenuSel guibg=#191919 guifg=#cacaca + hi WinBar guifg=#4c4c4c + hi WinSeparator guifg=#191919 + " + "" status line + hi StatusLine guibg=#191919 guifg=#4c4c4c + hi StatuslineInactive guibg=#191919 guifg=#4c4c4c gui=NONE + hi StatuslineAccent guifg=#0f0f0f guibg=#aca98a gui=bold + hi StatuslineInsertAccent guifg=#0f0f0f guibg=#8aabac gui=bold + hi StatuslineVisualAccent guifg=#0f0f0f guibg=#8f8aac gui=bold + hi StatuslineReplaceAccent guifg=#0f0f0f guibg=#ac8a8c gui=bold + hi StatuslineTerminalAccent guifg=#0f0f0f guibg=#ac8a8c gui=bold + hi StatuslineCommandAccent guifg=#0f0f0f guibg=#8aac8b gui=bold + hi StatuslineFileIcon guibg=#191919 guifg=#8f8aac + hi StatuslineInfo guibg=#191919 guifg=#4c4c4c + hi LspError guibg=#191919 guifg=#c49ea0 + hi LspWarn guibg=#191919 guifg=#8f8aac + hi LspInfo guibg=#191919 guifg=#8f8aac + hi LspHint guibg=#191919 guifg=#8aabac + ''; + }; + }; +} diff --git a/modules/default.nix b/modules/default.nix index 8b6d5a0..08749ae 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -18,6 +18,7 @@ ./services ./gpg ./pass - ./mountain.nix + ./colors + # ./mountain.nix ]; } diff --git a/modules/mountain.nix b/modules/mountain.nix deleted file mode 100644 index 94066d6..0000000 --- a/modules/mountain.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.modules.mountain; - hexColorRegex = ''#([0-9a-fA-F]{3}){1,2}''; - hexColor = { - type = lib.types.strMatching hexColorRegex; - }; -in -{ - options.modules.mountain = { - enable = lib.mkEnableOption "mountain theme"; - }; - - config = lib.mkIf cfg.enable { - modules.scheme = { - name = "base16-default-dark"; - base00 = "#0f0f0f"; - base01 = "#191919"; - base02 = "#262626"; - base03 = "#4c4c4c"; - base04 = "#ac8a8c"; - base05 = "#cacaca"; - base06 = "#e7e7e7"; - base07 = "#f0f0f0"; - base08 = "#ac8a8c"; - base09 = "#ceb188"; - base0A = "#aca98a"; - base0B = "#8aac8b"; - base0C = "#8aabac"; - base0D = "#8f8aac"; - base0E = "#ac8aac"; - base0F = "#ac8a8c"; - }; - }; -} diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index d3c1096..e09866d 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ...}: let cfg = config.modules.neovim; + scheme = config.modules.scheme; in { options.modules.neovim = { @@ -54,7 +55,13 @@ in # extraLuaPackages = ps: with ps; [ # ]; extraLuaConfig = '' + vim.cmd[[colorscheme ${scheme.name}]] ${builtins.readFile ./nvim/init.lua} + vim.cmd[[${scheme.extraVimConfig}]] + vim.cmd[[ + hi StatusLineNC guibg=none guifg=#4c4c4c + hi StatusLine guibg=none guifg=#8f8aac + ]] ''; }; }; diff --git a/modules/neovim/nvim/init.lua b/modules/neovim/nvim/init.lua index 8e3fb74..47ae792 100644 --- a/modules/neovim/nvim/init.lua +++ b/modules/neovim/nvim/init.lua @@ -1,5 +1,5 @@ require("config.settings") require("config.keybinds") -require("config.colorscheme") +-- require("config.colorscheme") require("config.lsp") require("config.treesitter") diff --git a/modules/scheme/default.nix b/modules/scheme/default.nix index 9d6e77e..0e1f0be 100644 --- a/modules/scheme/default.nix +++ b/modules/scheme/default.nix @@ -5,36 +5,6 @@ let hexColor = { type = lib.types.strMatching hexColorRegex; }; - base16Palette = { - options = { - name = lib.mkOption { - type = lib.types.uniq lib.types.str; - description = "scheme name"; - example = "base16-default-dark"; - }; - light = lib.mkOption { - type = lib.types.uniq lib.types.bool; - default = false; - description = "whether this is a light colorscheme"; - }; - base00 = lib.mkOption hexColor; - base01 = lib.mkOption hexColor; - base02 = lib.mkOption hexColor; - base03 = lib.mkOption hexColor; - base04 = lib.mkOption hexColor; - base05 = lib.mkOption hexColor; - base06 = lib.mkOption hexColor; - base07 = lib.mkOption hexColor; - base08 = lib.mkOption hexColor; - base09 = lib.mkOption hexColor; - base0A = lib.mkOption hexColor; - base0B = lib.mkOption hexColor; - base0C = lib.mkOption hexColor; - base0D = lib.mkOption hexColor; - base0E = lib.mkOption hexColor; - base0F = lib.mkOption hexColor; - }; - }; in { options.modules.scheme = { @@ -43,6 +13,19 @@ in description = "scheme name"; example = "base16-default-dark"; }; + light = lib.mkOption { + type = lib.types.uniq lib.types.bool; + default = false; + description = "whether this is a light colorscheme"; + }; + extraVimConfig = lib.mkOption { + type = lib.types.str; + default = ""; + description = '' + extra vimscript config for the theme. + Intended use is to set extra highlights. + ''; + }; base00 = lib.mkOption hexColor; base01 = lib.mkOption hexColor; base02 = lib.mkOption hexColor; diff --git a/void/home.nix b/void/home.nix index aee487c..7a9fba5 100644 --- a/void/home.nix +++ b/void/home.nix @@ -17,7 +17,7 @@ }; foot.enable = true; - mountain.enable = true; + colors.mountain.enable = true; gpg.enable = true; pass = { |