From b62cfd2ef1cc982ccb21351d0305c800ef42a518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey?= Date: Mon, 6 Apr 2026 16:37:03 -0700 Subject: [PATCH 1/2] feat(glyph): add claude-pace statusline for Claude Code Packages claude-pace (v0.7.3) as a custom Nix derivation and configures it as the Claude Code statusline. Displays model, project, git branch/diff stats, and 5h/7d rate limit usage with pace delta and reset countdown. Sets CLAUDE_PACE_API_FALLBACK=0 to disable OAuth API fallback since rate limits are available directly from stdin on Claude Code >= 2.1.80. Co-Authored-By: Claude Sonnet 4.6 --- modules/home/development.nix | 9 ++++++++ overlays/custom-packages.nix | 3 +++ packages/claude-pace/package.nix | 38 ++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 packages/claude-pace/package.nix diff --git a/modules/home/development.nix b/modules/home/development.nix index b531c758..e462bf65 100644 --- a/modules/home/development.nix +++ b/modules/home/development.nix @@ -27,6 +27,11 @@ in { config = lib.mkMerge [ (mkIf cfg.ai.enable { + programs.zsh.sessionVariables = { + # Disable claude-pace API fallback; rate limits come from stdin on CC >= 2.1.80 + CLAUDE_PACE_API_FALLBACK = "0"; + }; + programs.mcp = { enable = true; servers.glyph = { @@ -42,6 +47,10 @@ in { model = "sonnet"; # Disabled in favor of Basic Memory MCP for cross-device access autoMemoryEnabled = false; + statusLine = { + type = "command"; + command = "${pkgs.claude-pace}/bin/claude-pace"; + }; permissions = { allow = [ # Nix store (read-only access for inspecting derivations and build outputs) diff --git a/overlays/custom-packages.nix b/overlays/custom-packages.nix index 9e7515bc..94ce6878 100644 --- a/overlays/custom-packages.nix +++ b/overlays/custom-packages.nix @@ -1,6 +1,9 @@ # Custom package definitions # These are packages not available in nixpkgs or requiring customization self: super: { + # Pace-aware statusline for Claude Code + claude-pace = super.callPackage ./../packages/claude-pace/package.nix {}; + # Claude desktop app claude-desktop = super.callPackage ./../packages/claude-desktop/package.nix {}; diff --git a/packages/claude-pace/package.nix b/packages/claude-pace/package.nix new file mode 100644 index 00000000..d6e662fe --- /dev/null +++ b/packages/claude-pace/package.nix @@ -0,0 +1,38 @@ +{ + lib, + fetchFromGitHub, + stdenv, + makeWrapper, + curl, + git, + jq, +}: +stdenv.mkDerivation rec { + pname = "claude-pace"; + version = "0.7.3"; + + src = fetchFromGitHub { + owner = "Astro-Han"; + repo = "claude-pace"; + rev = "v${version}"; + hash = "sha256-88qKvC+8Fu2IvBkU3SGbCj2tL78kh4yux4fUE1mo5Jw="; + }; + + nativeBuildInputs = [makeWrapper]; + + installPhase = '' + mkdir -p $out/bin + cp claude-pace.sh $out/bin/claude-pace + chmod +x $out/bin/claude-pace + wrapProgram $out/bin/claude-pace \ + --prefix PATH : ${lib.makeBinPath [curl git jq]} + ''; + + meta = with lib; { + description = "Pace-aware statusline for Claude Code with rate limit tracking and pace delta"; + homepage = "https://github.com/Astro-Han/claude-pace"; + license = licenses.mit; + mainProgram = "claude-pace"; + platforms = platforms.unix; + }; +} From 50a9068e0fe198daa8c7df5de49ddf9890819e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey?= Date: Mon, 6 Apr 2026 16:38:16 -0700 Subject: [PATCH 2/2] chore: ignore nix result symlinks Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 44b25574..a64b4516 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ .direnv /.pre-commit-config.yaml +/result +/result-*