From 3c9a1076082543b0d22d9853e26dd9bf80ac1590 Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 12:06:36 +0200 Subject: [PATCH] feat: add missing packages and programs to base cli-tools - packages.nix: essential packages (jq, ripgrep, fd, htop, coreutils, lazygit, httpie, just, devenv, gcc, go, sqlite, sqlite-vec, nix-index, nix-update, progress, comma, fabric-ai, llm, basecamp, hyprpaper-random, libnotify, trash-cli, unzip, zip, yazi) - bat.nix: bat with nix-colors derived syntax theme - carapace.nix: multi-shell completion (fish, nushell, bash) - direnv.nix: automatic env loading with nix-direnv - eza.nix: modern ls with icons, git status, long format - lf.nix: terminal file manager with bat preview - zoxide.nix: smarter cd with fish and nushell integration - zellij-ps.nix: project session manager wrapping cli.zellij-ps --- home/base/cli-tools/bat.nix | 144 ++++++++++++++++++++++++++++++ home/base/cli-tools/carapace.nix | 20 +++++ home/base/cli-tools/default.nix | 8 ++ home/base/cli-tools/direnv.nix | 19 ++++ home/base/cli-tools/eza.nix | 20 +++++ home/base/cli-tools/lf.nix | 27 ++++++ home/base/cli-tools/packages.nix | 51 +++++++++++ home/base/cli-tools/zellij-ps.nix | 27 ++++++ home/base/cli-tools/zoxide.nix | 19 ++++ 9 files changed, 335 insertions(+) create mode 100644 home/base/cli-tools/bat.nix create mode 100644 home/base/cli-tools/carapace.nix create mode 100644 home/base/cli-tools/direnv.nix create mode 100644 home/base/cli-tools/eza.nix create mode 100644 home/base/cli-tools/lf.nix create mode 100644 home/base/cli-tools/packages.nix create mode 100644 home/base/cli-tools/zellij-ps.nix create mode 100644 home/base/cli-tools/zoxide.nix diff --git a/home/base/cli-tools/bat.nix b/home/base/cli-tools/bat.nix new file mode 100644 index 0000000..473ae69 --- /dev/null +++ b/home/base/cli-tools/bat.nix @@ -0,0 +1,144 @@ +# Bat — cat replacement with nix-colors syntax highlighting theme. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.base.cliTools.bat; + palette = config.colorScheme.palette; +in { + options.base.cliTools.bat.enable = mkEnableOption "enable bat with nix-colors theme"; + + config = mkIf cfg.enable { + programs.bat = { + enable = true; + config = {theme = "universal";}; + themes = { + universal = { + src = pkgs.writeText "universal.tmTheme" '' + + + + + name + Universal (nix-colors) + settings + + + settings + + background + #${palette.base00} + foreground + #${palette.base05} + caret + #${palette.base05} + selection + #${palette.base02} + selectionForeground + #${palette.base05} + lineHighlight + #${palette.base01} + + + + name + Comment + scope + comment + settings + + foreground + #${palette.base03} + fontStyle + italic + + + + name + String + scope + string + settings + + foreground + #${palette.base0A} + + + + name + Number + scope + constant.numeric + settings + + foreground + #${palette.base0E} + + + + name + Keyword + scope + keyword + settings + + foreground + #${palette.base08} + + + + name + Function + scope + entity.name.function + settings + + foreground + #${palette.base0B} + + + + name + Type + scope + entity.name.type, storage.type + settings + + foreground + #${palette.base0D} + + + + name + Variable + scope + variable + settings + + foreground + #${palette.base05} + + + + name + Constant + scope + constant + settings + + foreground + #${palette.base0E} + + + + + + ''; + }; + }; + }; + }; +} diff --git a/home/base/cli-tools/carapace.nix b/home/base/cli-tools/carapace.nix new file mode 100644 index 0000000..5fbb595 --- /dev/null +++ b/home/base/cli-tools/carapace.nix @@ -0,0 +1,20 @@ +# Carapace — multi-shell completion engine with Fish, Nushell, and Bash integration. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.carapace; +in { + options.base.cliTools.carapace.enable = mkEnableOption "enable carapace completion engine"; + + config = mkIf cfg.enable { + programs.carapace = { + enable = true; + enableFishIntegration = true; + enableNushellIntegration = true; + enableBashIntegration = true; + }; + }; +} diff --git a/home/base/cli-tools/default.nix b/home/base/cli-tools/default.nix index 0a4dd8f..3125597 100644 --- a/home/base/cli-tools/default.nix +++ b/home/base/cli-tools/default.nix @@ -1,9 +1,17 @@ # CLI tools aggregator — imports all base command-line utilities. {...}: { imports = [ + ./bat.nix + ./carapace.nix + ./direnv.nix + ./eza.nix ./fzf.nix + ./lf.nix ./nitch.nix + ./packages.nix ./television.nix ./zellij.nix + ./zellij-ps.nix + ./zoxide.nix ]; } diff --git a/home/base/cli-tools/direnv.nix b/home/base/cli-tools/direnv.nix new file mode 100644 index 0000000..d7f7c7e --- /dev/null +++ b/home/base/cli-tools/direnv.nix @@ -0,0 +1,19 @@ +# Direnv — automatic environment loading with nix-direnv integration. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.direnv; +in { + options.base.cliTools.direnv.enable = mkEnableOption "enable direnv with nix-direnv"; + + config = mkIf cfg.enable { + programs.direnv = { + enable = true; + enableNushellIntegration = true; + nix-direnv.enable = true; + }; + }; +} diff --git a/home/base/cli-tools/eza.nix b/home/base/cli-tools/eza.nix new file mode 100644 index 0000000..9d2df93 --- /dev/null +++ b/home/base/cli-tools/eza.nix @@ -0,0 +1,20 @@ +# Eza — modern ls replacement with icons, git status, and long format by default. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.eza; +in { + options.base.cliTools.eza.enable = mkEnableOption "enable eza modern ls replacement"; + + config = mkIf cfg.enable { + programs.eza = { + enable = true; + enableFishIntegration = true; + enableBashIntegration = true; + extraOptions = ["-l" "--icons" "--git" "-a"]; + }; + }; +} diff --git a/home/base/cli-tools/lf.nix b/home/base/cli-tools/lf.nix new file mode 100644 index 0000000..67bc50a --- /dev/null +++ b/home/base/cli-tools/lf.nix @@ -0,0 +1,27 @@ +# Lf — terminal file manager with bat preview and Dracula theme. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.base.cliTools.lf; +in { + options.base.cliTools.lf.enable = mkEnableOption "enable lf terminal file manager"; + + config = mkIf cfg.enable { + home.packages = [pkgs.lf]; + + programs.lf = { + enable = true; + settings = { + preview = true; + drawbox = true; + hidden = true; + icons = true; + previewer = "bat"; + }; + }; + }; +} diff --git a/home/base/cli-tools/packages.nix b/home/base/cli-tools/packages.nix new file mode 100644 index 0000000..fcfec2a --- /dev/null +++ b/home/base/cli-tools/packages.nix @@ -0,0 +1,51 @@ +# Essential CLI packages — core utilities always available on every host. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.base.cliTools.essentials; +in { + options.base.cliTools.essentials.enable = mkEnableOption "enable essential CLI packages"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + # Core utilities + coreutils + fd + htop + jq + ripgrep + + # Dev tools + devenv + gcc + go + httpie + just + lazygit + nix-index + nix-update + progress + sqlite + sqlite-vec + tldr + + # AI tools + comma + fabric-ai + llm + + # Misc + basecamp + hyprpaper-random + libnotify + trash-cli + unzip + yazi + zip + ]; + }; +} diff --git a/home/base/cli-tools/zellij-ps.nix b/home/base/cli-tools/zellij-ps.nix new file mode 100644 index 0000000..c2f8c72 --- /dev/null +++ b/home/base/cli-tools/zellij-ps.nix @@ -0,0 +1,27 @@ +# Zellij-ps — project-aware Zellij session manager from m3ta-nixpkgs. +# Delegates to the cli.zellij-ps module provided by inputs.m3ta-nixpkgs. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.zellijPs; +in { + options.base.cliTools.zellijPs = { + enable = mkEnableOption "enable zellij-ps project session manager"; + + projectFolders = mkOption { + type = types.listOf types.path; + description = "Project root folders scanned by zellij-ps."; + default = ["${config.home.homeDirectory}/p"]; + }; + }; + + config = mkIf cfg.enable { + cli.zellij-ps = { + enable = true; + projectFolders = cfg.projectFolders; + }; + }; +} diff --git a/home/base/cli-tools/zoxide.nix b/home/base/cli-tools/zoxide.nix new file mode 100644 index 0000000..8c27c6f --- /dev/null +++ b/home/base/cli-tools/zoxide.nix @@ -0,0 +1,19 @@ +# Zoxide — smarter cd with Fish and Nushell integration. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.zoxide; +in { + options.base.cliTools.zoxide.enable = mkEnableOption "enable zoxide smarter cd"; + + config = mkIf cfg.enable { + programs.zoxide = { + enable = true; + enableFishIntegration = true; + enableNushellIntegration = true; + }; + }; +}