From 1194aafb8c4526ca73b8620ecd47d45b7a70158f Mon Sep 17 00:00:00 2001 From: louib Date: Sun, 19 Oct 2025 18:23:17 -0400 Subject: [PATCH] refactor: use colorscheme for claude --- claude.nix | 47 +++++++++++++++++++++++++++++++++++++++++++++++ claude.toml | 24 ------------------------ consts.nix | 2 +- flake.nix | 1 + 4 files changed, 49 insertions(+), 25 deletions(-) create mode 100644 claude.nix delete mode 100644 claude.toml diff --git a/claude.nix b/claude.nix new file mode 100644 index 0000000..9146f1a --- /dev/null +++ b/claude.nix @@ -0,0 +1,47 @@ +{...}: let + colors = builtins.fromTOML (builtins.readFile ./colorscheme/colors.toml); + + theme = { + foreground = "#${colors.nvim.light0}"; + background = "#${colors.nvim.dark0}"; + selection = "#${colors.wezterm.active_tab_bg}"; + cursor = "#${colors.nvim.light1}"; + black = "#${colors.nvim.dark0}"; + red = "#${colors.wezterm.neutral_red}"; + green = "#${colors.wezterm.neutral_green}"; + yellow = "#${colors.wezterm.neutral_yellow}"; + blue = "#${colors.wezterm.neutral_blue}"; + magenta = "#${colors.wezterm.neutral_purple}"; + cyan = "#${colors.wezterm.neutral_aqua}"; + white = "#${colors.nvim.light4}"; + bright_black = "#${colors.wezterm.gray}"; + bright_red = "#${colors.wezterm.bright_red}"; + bright_green = "#${colors.wezterm.bright_green}"; + bright_yellow = "#${colors.nvim.light1}"; + bright_blue = "#${colors.wezterm.bright_blue}"; + bright_magenta = "#${colors.wezterm.bright_purple}"; + bright_cyan = "#${colors.wezterm.bright_aqua}"; + bright_white = "#${colors.nvim.light1}"; + }; +in '' + [editor] + vim_mode = true + + [theme] + selection = "${theme.selection}" + cursor = "${theme.cursor}" + black = "${theme.black}" + red = "${theme.red}" + green = "${theme.green}" + blue = "${theme.blue}" + magenta = "${theme.magenta}" + cyan = "${theme.cyan}" + white = "${theme.white}" + bright_black = "${theme.bright_black}" + bright_red = "${theme.bright_red}" + bright_green = "${theme.bright_green}" + bright_blue = "${theme.bright_blue}" + bright_magenta = "${theme.bright_magenta}" + bright_cyan = "${theme.bright_cyan}" + bright_white = "${theme.bright_white}" +'' diff --git a/claude.toml b/claude.toml deleted file mode 100644 index aa41f31..0000000 --- a/claude.toml +++ /dev/null @@ -1,24 +0,0 @@ -[editor] -vim_mode = true - -[theme] -foreground = "#ebdbb2" -background = "#282828" -selection = "#458588" -cursor = "#ebdbb2" -black = "#282828" -red = "#cc241d" -green = "#98971a" -yellow = "#d79921" -blue = "#458588" -magenta = "#b16286" -cyan = "#689d6a" -white = "#a89984" -bright_black = "#928374" -bright_red = "#d85f5f" -bright_green = "#98a83c" -bright_yellow = "#d5b06b" -bright_blue = "#7a9a9d" -bright_magenta = "#b77a93" -bright_cyan = "#7dab8f" -bright_white = "#ebdbb2" diff --git a/consts.nix b/consts.nix index de6af58..9a8d0df 100644 --- a/consts.nix +++ b/consts.nix @@ -62,7 +62,7 @@ rec { GIT_DELTA_CONFIG = import (./. + "/colorscheme/delta.nix") {}; WEZTERM_CONFIG = builtins.readFile (./. + "/wezterm/.wezterm.lua"); WEZTERM_THEME = builtins.readFile (./. + "/wezterm/wezterm_theme.lua"); - CLAUDE_CONFIG = builtins.readFile (./. + "/claude.toml"); + CLAUDE_CONFIG = import (./. + "/claude.nix") {}; AIDER_CONFIG = '' assistant-output-color: '#${COLORS.aider.assistant-output-color}' tool-output-color: '#${COLORS.aider.tool-output-color}' diff --git a/flake.nix b/flake.nix index 2bf9ee5..89a7230 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,7 @@ pkgs = nixpkgs.legacyPackages.${system}; in { packages = { + claude-config = import ./claude.nix { inherit pkgs; }; }; devShells.default = pkgs.mkShell { buildInputs = with pkgs; [