Skip to content

Commit 12f7a08

Browse files
committed
feat(pkgs/darwin): add codexbar-bin and enable copilot/gemini providers
Add CodexBar v0.17.0, a macOS menu bar app that displays usage limits for AI tools (Codex, Claude, Cursor, Gemini, Copilot). Enable the github-copilot and gemini-cli modules so CodexBar can track their usage.
1 parent 0178491 commit 12f7a08

File tree

4 files changed

+45
-2
lines changed

4 files changed

+45
-2
lines changed

home/ai/repl/copilot/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
imports = lib.custom.scanPaths ./.;
77

88
programs.github-copilot = {
9-
enable = false;
9+
enable = true;
1010
package = pkgs.writeShellScriptBin "copilot" ''
1111
exec ${pkgs.ai.copilot-cli}/bin/copilot --enable-all-github-mcp-tools --banner "$@"
1212
'';

home/ai/repl/gemini/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
imports = lib.custom.scanPaths ./.;
77

88
programs.gemini-cli = {
9-
enable = false;
9+
enable = true;
1010
package = pkgs.writeShellScriptBin "gemini" ''
1111
exec ${pkgs.pnpm}/bin/pnpm dlx @google/gemini-cli "$@"
1212
'';

home/gui/darwin/misc.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
MultiSoundChanger-bin # aggregate-output volume control in menubar
2525
LibreScore-bin # Music notation ripper
2626
iris # Webcam mirror
27+
#codexbar-bin # AI usage limits in menubar
2728
#LosslessSwitcher-bin # Lossless audio toggle in menubar
2829
;
2930

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
stdenvNoCC,
3+
fetchzip,
4+
lib,
5+
makeWrapper,
6+
unzip,
7+
...
8+
}:
9+
stdenvNoCC.mkDerivation (finalAttrs: {
10+
pname = "CodexBar";
11+
version = "0.17.0";
12+
src = fetchzip {
13+
extension = "zip";
14+
url = "https://github.com/steipete/CodexBar/releases/download/v${finalAttrs.version}/CodexBar-${finalAttrs.version}.zip";
15+
hash = "sha256-tPGYIqrSRDpLYv2yP2EA6dFVpAfaL+gPxaR3osbYBnU=";
16+
};
17+
18+
nativeBuildInputs = [unzip makeWrapper];
19+
20+
installPhase = ''
21+
runHook preInstall
22+
23+
mkdir -p "$out/Applications/${finalAttrs.pname}.app"
24+
cp -R ./* "$out/Applications/${finalAttrs.pname}.app"
25+
26+
if [[ -e "$out/Applications/${finalAttrs.pname}.app/Contents/MacOS/${finalAttrs.pname}" ]]; then
27+
mkdir -p "$out/bin"
28+
makeWrapper "$out/Applications/${finalAttrs.pname}.app/Contents/MacOS/${finalAttrs.pname}" "$out/bin/${finalAttrs.pname}"
29+
fi
30+
31+
runHook postInstall
32+
'';
33+
34+
meta = {
35+
description = "macOS menu bar app showing Codex, Claude, Cursor, Gemini, Copilot limits";
36+
homepage = "https://github.com/steipete/CodexBar";
37+
license = lib.licenses.mit;
38+
platforms = lib.platforms.darwin;
39+
maintainers = with lib.maintainers; [DivitMittal];
40+
sourceProvenance = with lib.sourceTypes; [binaryNativeCode];
41+
};
42+
})

0 commit comments

Comments
 (0)