From 38e630d7270027387c1c0912cd21562245822676 Mon Sep 17 00:00:00 2001 From: EdenQwQ Date: Mon, 1 Dec 2025 22:23:21 +0800 Subject: [PATCH] add kimi --- flake.lock | 17 +++++++++++++++++ flake.nix | 1 + home/programs/utils/ai.nix | 19 +++++++++++++++++-- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index a60c7ef..3830397 100644 --- a/flake.lock +++ b/flake.lock @@ -865,6 +865,22 @@ "type": "github" } }, + "nixpkgs-kimi-cli": { + "locked": { + "lastModified": 1762848367, + "narHash": "sha256-xI+WSnETMXwwbB0sGmKs6wwUwIFvAfRW30KBLyajGDI=", + "owner": "jetjinser", + "repo": "nixpkgs", + "rev": "7bd2238bc0eef41e08cd1ac6c36aa7a2af27759d", + "type": "github" + }, + "original": { + "owner": "jetjinser", + "ref": "jinser/kimi-cli", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-lib": { "locked": { "lastModified": 1761765539, @@ -1375,6 +1391,7 @@ "nixGL": "nixGL", "nixd": "nixd", "nixpkgs": "nixpkgs_12", + "nixpkgs-kimi-cli": "nixpkgs-kimi-cli", "nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-wayland": "nixpkgs-wayland", "nixvim": "nixvim", diff --git a/flake.nix b/flake.nix index fb1488e..d51920c 100644 --- a/flake.nix +++ b/flake.nix @@ -102,5 +102,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; hexecute.url = "github:ThatOtherAndrew/Hexecute"; + nixpkgs-kimi-cli.url = "github:jetjinser/nixpkgs/jinser/kimi-cli"; }; } diff --git a/home/programs/utils/ai.nix b/home/programs/utils/ai.nix index d4d2d4c..3a8432a 100644 --- a/home/programs/utils/ai.nix +++ b/home/programs/utils/ai.nix @@ -1,4 +1,9 @@ -{ pkgs, config, ... }: +{ + pkgs, + config, + inputs, + ... +}: { programs.gemini-cli = { enable = true; @@ -12,7 +17,17 @@ ANTHROPIC_BASE_URL = "https://anyrouter.top"; SILICONFLOW_API_KEY = "$(cat ${config.age.secrets.siliconflow_token.path})"; }; - home.packages = with pkgs; [ nur.repos.charmbracelet.crush ]; + home.packages = with pkgs; [ + nur.repos.charmbracelet.crush + (inputs.nixpkgs-kimi-cli.legacyPackages.${pkgs.stdenv.hostPlatform.system}.kimi-cli.overrideAttrs { + src = fetchFromGitHub { + owner = "MoonshotAI"; + repo = "kimi-cli"; + rev = "8c942b97c52996885a508e37e503d37b63e5bf90"; + hash = "sha256-mRoyGpZv6C2wva3ishqqRLQwoabeKDtCrpVoFBwX5QM="; + }; + }) + ]; xdg.configFile."crush/crush.json".text = '' { "providers": {