Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

.direnv
/.pre-commit-config.yaml
/result
/result-*
9 changes: 9 additions & 0 deletions modules/home/development.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions overlays/custom-packages.nix
Original file line number Diff line number Diff line change
@@ -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 {};

Expand Down
38 changes: 38 additions & 0 deletions packages/claude-pace/package.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
Loading