Changes
9 changed files (+171/-190)
-
-
@@ -43,6 +43,8 @@ helix = {enable = true; settings = { theme = "base16_default"; editor = { auto-pairs = false;
-
@@ -106,6 +108,11 @@ # Colourful `cat`# https://github.com/sharkdp/bat bat = { enable = true; config = { # Use ANSI colors theme = "ansi"; }; }; # `top` alternative
-
-
-
@@ -19,6 +19,29 @@-- Disable insane mouse hijacking vim.opt.mouse = "" -- Use ANSI colors vim.o.termguicolors = false -- Highlight current cursor line vim.o.cursorline = true -- Theme vim.cmd[[highlight! Comment ctermfg=7 cterm=italic]] vim.cmd[[highlight! Constant ctermfg=1 cterm=NONE]] vim.cmd[[highlight! Statement ctermfg=1]] vim.cmd[[highlight! Special ctermfg=3]] vim.cmd[[highlight! Function ctermfg=NONE cterm=bold]] vim.cmd[[highlight! NonText ctermfg=0]] vim.cmd[[highlight! LineNr ctermfg=8]] vim.cmd[[highlight! CursorLineNr ctermfg=7 cterm=bold]] vim.cmd[[highlight! Directory ctermfg=4]] vim.cmd[[highlight! Type ctermfg=6]] vim.cmd[[highlight! Operator ctermfg=7]] vim.cmd[[highlight! Identifier ctermfg=NONE]] vim.cmd[[highlight! Delimiter ctermfg=7]] vim.cmd[[highlight! @tag ctermfg=NONE cterm=italic]] vim.cmd[[highlight! @tag.builtin ctermfg=7 cterm=bold]] -- Prevent stupid CSS "defaults" from registering hyphen as a keyword vim.api.nvim_create_autocmd( "Filetype",
-
@@ -150,8 +173,46 @@ {plugin = lualine-nvim; type = "lua"; config = '' local lualine_colors = { active_bg = 0, inactive_bg = 0, inactive_fg = 8, } require("lualine").setup({ options = { theme = { normal = { a = { bg = lualine_colors.active_bg, gui = "bold" }, b = { bg = lualine_colors.active_bg }, c = { bg = lualine_colors.active_bg }, }, insert = { a = { bg = lualine_colors.active_bg, gui = "bold" }, b = { bg = lualine_colors.active_bg }, c = { bg = lualine_colors.active_bg }, }, visual = { a = { bg = lualine_colors.active_bg, gui = "bold" }, b = { bg = lualine_colors.active_bg }, c = { bg = lualine_colors.active_bg }, }, replace = { a = { bg = lualine_colors.active_bg, gui = "bold" }, b = { bg = lualine_colors.active_bg }, c = { bg = lualine_colors.active_bg }, }, command = { a = { bg = lualine_colors.active_bg, gui = "bold" }, b = { bg = lualine_colors.active_bg }, c = { bg = lualine_colors.active_bg }, }, inactive = { a = { fg = lualine_colors.inactive_fg, bg = lualine_colors.inactive_bg, gui = "bold" }, b = { fg = lualine_colors.inactive_fg, bg = lualine_colors.inactive_bg }, c = { fg = lualine_colors.inactive_fg, bg = lualine_colors.inactive_bg }, }, }, icons_enabled = false, section_separators = "", component_separators = "",
-
-
-
@@ -11,7 +11,7 @@ options = {features.basics.zsh.theme = { text = lib.mkOption { type = lib.types.nonEmptyStr; default = "%{$fg[white]%}"; default = "%f"; }; vi.insert = lib.mkOption {
-
@@ -43,7 +43,7 @@ };symbol = lib.mkOption { type = lib.types.nonEmptyStr; default = "%{$fg[black]%}"; default = "%F{8}"; }; }; };
-
-
-
@@ -1,34 +1,5 @@{ config, lib, pkgs, ... }: let cfg = config.features.data.nushell; colorGroup = lib.types.attrsOf (lib.types.either lib.types.nonEmptyStr colorGroup); serializeGroup = g: let lines = lib.attrsets.mapAttrsToList (name: colorOrSubGroup: "${name}: ${if (builtins.isString colorOrSubGroup) then "\"${colorOrSubGroup}\"" else (serializeGroup colorOrSubGroup)}" ) g; in "{ ${lib.strings.concatStringsSep " " lines} }"; in { options = { features.data.nushell.colorConfig = lib.mkOption { description = '' Nushell color config object. See https://www.nushell.sh/book/coloring_and_theming.html#theming for details. ''; type = colorGroup; default = { }; }; }; config = lib.mkIf config.features.data.enable { programs.nushell = { enable = lib.mkDefault true;
-
@@ -36,11 +7,7 @@configFile.text = '' $env.config = { show_banner: false color_config: ${serializeGroup cfg.colorConfig} edit_mode: vi ls: { use_ls_colors: true } } '';
-
-
-
@@ -13,5 +13,6 @@ };imports = [ ./kitty.nix ./ghostty.nix ]; }
-
-
features/gui/ghostty.nix (new)
-
@@ -0,0 +1,38 @@{ config, lib, pkgs, ... }: { config = lib.mkIf config.features.gui.enable { programs.ghostty = { enable = true; package = pkgs.ghostty; settings = { font-size = 14; font-family = "Monaspace Neon Var"; font-style = "Medium"; font-style-bold = "Bold"; font-style-italic = "Medium Italic"; font-style-bold-italic = "Bold Italic"; font-feature = "calt"; copy-on-select = false; }; keybindings = { "ctrl+shift+t" = "new_tab"; "ctrl+shift+n" = "new_split:right"; "ctrl+shift+m" = "new_split:down"; "super+shift+k" = "resize_split:up,10"; "super+shift+h" = "resize_split:left,10"; "super+shift+j" = "resize_split:down,10"; "super+shift+l" = "resize_split:right,10"; "ctrl+shift+k" = "goto_split:top"; "ctrl+shift+h" = "goto_split:left"; "ctrl+shift+j" = "goto_split:bottom"; "ctrl+shift+l" = "goto_split:right"; }; }; }; }
-
-
-
@@ -52,6 +52,21 @@ "id": "flake-utils","type": "indirect" } }, "hm-ghostty": { "locked": { "lastModified": 1702368251, "narHash": "sha256-hafrDmzGplzm+vdIo+LkOjRfA4qRcy5JmpGGksnht5c=", "owner": "clo4", "repo": "ghostty-hm-module", "rev": "887e13a6e7acf5ffaab0119d96e476d84db90904", "type": "github" }, "original": { "owner": "clo4", "repo": "ghostty-hm-module", "type": "github" } }, "home-manager": { "inputs": { "nixpkgs": [
-
@@ -128,6 +143,7 @@ }}, "root": { "inputs": { "hm-ghostty": "hm-ghostty", "home-manager": "home-manager", "mac-app-util": "mac-app-util", "nixpkgs": "nixpkgs_2"
-
-
-
@@ -12,6 +12,10 @@mac-app-util = { url = "github:hraban/mac-app-util"; }; hm-ghostty = { url = "github:clo4/ghostty-hm-module"; }; }; outputs =
-
@@ -19,6 +23,7 @@ { self, nixpkgs , home-manager , mac-app-util , hm-ghostty , }: let
-
@@ -39,6 +44,7 @@ [# Fix Home-Manager on MacOS cannot register GUI applications and Spotlight # won't find those applications. mac-app-util.homeManagerModules.default hm-ghostty.homeModules.default ./features ({ config, ... }: rec { # Turn off Home Manager news bs
-
-
-
@@ -57,42 +57,6 @@ height = cfg.wallpaperHeight;}; in { features.basics.zsh.theme = let zshFg = hex: "%F{${hex}}"; in { text = zshFg flavor.text.hex; vi.insert = zshFg flavor.blue.hex; vi.normal = zshFg flavor.green.hex; vcs.info = zshFg flavor.subtext0.hex; vcs.staged = zshFg flavor.green.hex; vcs.unstaged = zshFg flavor.red.hex; symbol = zshFg flavor.overlay0.hex; }; # Only a subset of configurable knobs... Nushell's docs and API stability is unbelievably bad. features.data.nushell = lib.mkIf (config.features.data.enable && config.programs.nushell.enable) { colorConfig = { separator = flavor.subtext1.hex; leading_trailing_space_bg = flavor.mantle.hex; header = flavor.green.hex; row_index = flavor.pink.hex; hints = flavor.subtext0.hex; date = flavor.maroon.hex; string = flavor.text.hex; bool = flavor.peach.hex; int = flavor.peach.hex; float = flavor.peach.hex; shape_bool = flavor.peach.hex; shape_string = flavor.green.hex; shape_int = flavor.peach.hex; shape_float = flavor.peach.hex; }; }; features.wayland-de = lib.mkIf config.features.wayland-de.enable { tofi = rec { fuzzyMatch = false;
-
@@ -212,10 +176,6 @@ };}; home.packages = [ # A generator for LS_COLORS with support for multiple color themes # https://github.com/sharkdp/vivid pkgs.vivid (lib.mkIf config.features.wayland-de.enable wallpaper) ];
-
@@ -340,125 +300,50 @@ }''; }; # Colourise eza, ls, lf, etc... # This needs to be done in .zshrc: in Crostini, `home.sessionVariables` # cannot invoke `vivid` binary. Probably evaluation timing? programs.zsh.initExtra = '' export LS_COLORS="$(vivid generate catppuccin-${cfg.flavor})" ''; programs.bat = lib.mkIf config.programs.bat.enable { themes = { "catppuccin-${cfg.flavor}" = { src = pkgs.fetchFromGitHub { owner = "catppuccin"; repo = "bat"; rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1"; sha256 = "1g2r6j33f4zys853i1c5gnwcdbwb6xv5w6pazfdslxf69904lrg9"; }; file = "Catppuccin-${cfg.flavor}.tmTheme"; programs.ghostty = let darkFlavor = if cfg.flavor == "latte" then "mocha" else cfg.flavor; in { settings = { theme = "light:catppuccin-latte-corrected,dark:catppuccin-${darkFlavor}"; }; }; config = { theme = "catppuccin-${cfg.flavor}"; }; }; programs.tmux.plugins = [ { plugin = pkgs.tmuxPlugins.catppuccin; extraConfig = '' set -g @plugin 'catppuccin/tmux' set -g @catppuccin_flavour '${cfg.flavor}' set -g @catppuccin_no_patched_fonts_theme_enabled on # The default palette is not correctly inverted. xdg.configFile."ghostty/themes/catppuccin-latte-corrected" = let latte = json.latte; hex = color: lib.strings.removePrefix "#" color.hex; in lib.mkIf config.programs.ghostty.enable { text = '' palette = 0=${latte.crust.hex} palette = 1=${latte.red.hex} palette = 2=${latte.green.hex} palette = 3=${latte.yellow.hex} palette = 4=${latte.blue.hex} palette = 5=${latte.pink.hex} palette = 6=${latte.teal.hex} palette = 7=${latte.subtext0.hex} palette = 8=${latte.surface2.hex} palette = 9=#de293e palette = 10=#49af3d palette = 11=#eea02d palette = 12=#456eff palette = 13=#fe85d8 palette = 14=#2d9fa8 palette = 15=${latte.text.hex} background = ${hex latte.base} foreground = ${hex latte.text} cursor-color = ${hex latte.rosewater} selection-background = ${hex latte.surface2} selection-foreground = ${hex latte.text} ''; } ]; programs.neovim = { plugins = [ { plugin = pkgs.vimPlugins.catppuccin-nvim; type = "lua"; config = let lspIntegration = lib.trivial.boolToString config.features.dev.lsp.enable; in '' vim.o.termguicolors = true require("catppuccin").setup({ flavour = "${cfg.flavor}", transparent_background = true, integrations = { indent_blankline = { enabled = true, }, cmp = ${lspIntegration}, lsp_trouble = ${lspIntegration}, }, }) vim.cmd.colorscheme "catppuccin" ''; } ]; }; programs.helix = { settings = { theme = "catppuccin"; }; themes = { catppuccin = { "ui.linenr" = { fg = flavor.text.hex; bg = "none"; }; "ui.linenr.selected" = { fg = flavor.mauve.hex; bg = "none"; modifiers = [ "bold" ]; }; "ui.selection" = { bg = flavor.overlay1.hex; }; "ui.selection.primary" = { bg = flavor.overlay0.hex; }; "ui.virtual.indent-guide" = { fg = flavor.surface1.hex; }; "comment" = { fg = flavor.subtext0.hex; modifiers = [ "italic" ]; }; "ui.statusline" = { fg = flavor.text.hex; bg = flavor.surface0.hex; }; "ui.statusline.inactive" = { fg = flavor.subtext0.hex; bg = flavor.surface0.hex; }; "ui.help" = { fg = flavor.text.hex; bg = flavor.surface1.hex; }; "ui.cursor" = { modifiers = [ "reversed" ]; }; "ui.popup" = { fg = flavor.text.hex; bg = flavor.surface1.hex; }; "ui.menu" = { fg = flavor.text.hex; bg = flavor.surface0.hex; }; "ui.menu.selected" = { underline = { style = "line"; }; modifiers = [ "bold" ]; }; "ui.menu.scroll" = { fg = flavor.teal.hex; bg = flavor.overlay0.hex; }; "variable" = flavor.rosewater.hex; "variable.builtin" = flavor.maroon.hex; "variable.other.member" = flavor.rosewater.hex; "constant" = flavor.maroon.hex; "constant.character.escape" = flavor.sapphire.hex; "constant.numeric" = flavor.mauve.hex; "attributes" = flavor.flamingo.hex; "type" = flavor.sapphire.hex; "ui.cursor.match" = { fg = flavor.yellow.hex; modifiers = [ "underlined" ]; }; "string" = flavor.green.hex; "function" = flavor.lavender.hex; "constructor" = flavor.blue.hex; "special" = flavor.blue.hex; "keyword" = flavor.pink.hex; "label" = flavor.pink.hex; "namespace" = flavor.blue.hex; "diff.plus" = flavor.green.hex; "diff.delta" = flavor.yellow.hex; "diff.minus" = flavor.red.hex; "diagnostic" = { modifiers = [ "underlined" ]; }; "ui.gutter" = { bg = "none"; }; "info" = flavor.blue.hex; "hint" = flavor.sky.hex; "debug" = flavor.flamingo.hex; "warning" = flavor.yellow.hex; "error" = flavor.red.hex; }; }; }; programs.kitty =
-