From 78ee2d41ecf4c18ce1da1290c06d515a6bf5a655 Mon Sep 17 00:00:00 2001 From: moons Date: Sat, 8 Aug 2026 05:51:40 +0900 Subject: [PATCH] codex usage vicinae --- flake.lock | 625 ++++++++++++++---- flake.nix | 2 + .../applications/codex-session-usage/home.nix | 52 ++ .../profiles/workload/development/meta.nix | 1 + 4 files changed, 563 insertions(+), 117 deletions(-) create mode 100644 modules/applications/codex-session-usage/home.nix diff --git a/flake.lock b/flake.lock index ab25398..fe87bfd 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,28 @@ { "nodes": { + "agent-skills": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": [ + "codex-session-usage", + "ccusage", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1783839654, + "narHash": "sha256-rn5DkeQ9PBaJTZl9juBtPnVawyN4B83tyz1VpiinQFo=", + "owner": "Kyure-A", + "repo": "agent-skills-nix", + "rev": "8326df98cf494dc515db99affa9ea9d2bd6666b6", + "type": "github" + }, + "original": { + "owner": "Kyure-A", + "repo": "agent-skills-nix", + "type": "github" + } + }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -92,14 +115,39 @@ }, "bun2nix": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts", + "nixpkgs": [ + "codex-session-usage", + "ccusage", + "nixpkgs" + ], + "systems": "systems_3", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1784665499, + "narHash": "sha256-9BMxlTxCCDAeoNLtb1a/st7udtTIJep+wpUzquA29VU=", + "owner": "nix-community", + "repo": "bun2nix", + "rev": "0f2a1f0b6f42cebe3b149bf62d38754c5e0e9729", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "bun2nix", + "type": "github" + } + }, + "bun2nix_2": { + "inputs": { + "flake-parts": "flake-parts_4", "import-tree": "import-tree", "nixpkgs": [ "handy", "nixpkgs" ], - "systems": "systems_4", - "treefmt-nix": "treefmt-nix" + "systems": "systems_5", + "treefmt-nix": "treefmt-nix_3" }, "locked": { "lastModified": 1770895533, @@ -116,7 +164,7 @@ "type": "github" } }, - "bun2nix_2": { + "bun2nix_3": { "inputs": { "flake-parts": [ "llm-agents", @@ -149,6 +197,35 @@ "type": "github" } }, + "ccusage": { + "inputs": { + "agent-skills": "agent-skills", + "bun2nix": "bun2nix", + "crane": "crane", + "flake-parts": "flake-parts_2", + "git-hooks": "git-hooks", + "litellm": "litellm", + "models-dev": "models-dev", + "nix-filter": "nix-filter", + "nixpkgs": "nixpkgs_2", + "rust-overlay": "rust-overlay", + "treefmt-nix": "treefmt-nix_2" + }, + "locked": { + "lastModified": 1785192580, + "narHash": "sha256-/x/RsJ8JLrGm8UXBewF/kbFLTdE51P+tPb3LwBT+LT8=", + "owner": "ccusage", + "repo": "ccusage", + "rev": "caf89e8c0291a2acec09e01ff609e6253f6dd81b", + "type": "github" + }, + "original": { + "owner": "ccusage", + "ref": "v20.0.19", + "repo": "ccusage", + "type": "github" + } + }, "codex-desktop-linux": { "inputs": { "flake-utils": "flake-utils_2", @@ -168,7 +245,41 @@ "type": "github" } }, + "codex-session-usage": { + "inputs": { + "ccusage": "ccusage", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1786132312, + "narHash": "sha256-ojmxNaUIC6mw+MopsFceIE/pfxPZHU3HKkAYajxfm3c=", + "owner": "moons-14", + "repo": "codex-session-usage", + "rev": "f15c23567977cfe4b7a33d7669c0c24bb0e63e0b", + "type": "github" + }, + "original": { + "owner": "moons-14", + "repo": "codex-session-usage", + "type": "github" + } + }, "crane": { + "locked": { + "lastModified": 1784407669, + "narHash": "sha256-gcFMcRjw0ZSn380Rx2QLlU1goUQeSrKX/DF12omI6+o=", + "owner": "ipetkov", + "repo": "crane", + "rev": "1316b7d278ad77a16aec024b71d971366e123bec", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_2": { "locked": { "lastModified": 1784564969, "narHash": "sha256-TkTWNhJV/8Wk3czlbz4bwHZkFCaCHPsOy+oJe4PUiXg=", @@ -224,13 +335,13 @@ "locked": { "lastModified": 1767039857, "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "edolstra", + "owner": "NixOS", "repo": "flake-compat", "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { - "owner": "edolstra", + "owner": "NixOS", "repo": "flake-compat", "type": "github" } @@ -240,13 +351,13 @@ "locked": { "lastModified": 1767039857, "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", + "owner": "edolstra", "repo": "flake-compat", "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "edolstra", "repo": "flake-compat", "type": "github" } @@ -268,6 +379,22 @@ } }, "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_5": { "flake": false, "locked": { "lastModified": 1767039857, @@ -283,7 +410,7 @@ "type": "github" } }, - "flake-compat_5": { + "flake-compat_6": { "flake": false, "locked": { "lastModified": 1767039857, @@ -300,9 +427,50 @@ } }, "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "codex-session-usage", + "ccusage", + "bun2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1782949081, + "narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" }, + "locked": { + "lastModified": 1782949081, + "narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, "locked": { "lastModified": 1785627969, "narHash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=", @@ -317,9 +485,9 @@ "type": "github" } }, - "flake-parts_2": { + "flake-parts_4": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" + "nixpkgs-lib": "nixpkgs-lib_3" }, "locked": { "lastModified": 1769996383, @@ -335,7 +503,7 @@ "type": "github" } }, - "flake-parts_3": { + "flake-parts_5": { "inputs": { "nixpkgs-lib": [ "llm-agents", @@ -356,7 +524,7 @@ "type": "github" } }, - "flake-parts_4": { + "flake-parts_6": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -377,7 +545,7 @@ "type": "github" } }, - "flake-parts_5": { + "flake-parts_7": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -455,10 +623,10 @@ }, "ghostty": { "inputs": { - "flake-compat": "flake-compat", - "home-manager": "home-manager", - "nixpkgs": "nixpkgs_2", - "systems": "systems_3", + "flake-compat": "flake-compat_2", + "home-manager": "home-manager_2", + "nixpkgs": "nixpkgs_4", + "systems": "systems_4", "zig": "zig", "zon2nix": "zon2nix" }, @@ -476,10 +644,33 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "codex-session-usage", + "ccusage", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1784288435, + "narHash": "sha256-ReRHaLgr/uVqdD8afFSn+myXIfpHeOhP0yYe0TJqAA8=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "43b3c1ab9d40fb1dbb008f451988a91e375825e9", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "git-hooks-nix": { "inputs": { - "flake-compat": "flake-compat_2", - "nixpkgs": "nixpkgs_3" + "flake-compat": "flake-compat_3", + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1784288435, @@ -516,7 +707,7 @@ }, "handy": { "inputs": { - "bun2nix": "bun2nix", + "bun2nix": "bun2nix_2", "nixpkgs": [ "nixpkgs" ] @@ -536,6 +727,29 @@ } }, "home-manager": { + "inputs": { + "nixpkgs": [ + "codex-session-usage", + "ccusage", + "agent-skills", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1783222121, + "narHash": "sha256-E/ElL373TO8lQ2aMvYyzN+k4xkVaUGoRqoa8AtM71tI=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "a1645f40777620c4bd2b6d854b290c2fc354a266", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { "inputs": { "nixpkgs": [ "ghostty", @@ -556,7 +770,7 @@ "type": "github" } }, - "home-manager_2": { + "home-manager_3": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -577,7 +791,7 @@ "type": "github" } }, - "home-manager_3": { + "home-manager_4": { "inputs": { "nixpkgs": [ "nix-hazkey", @@ -615,12 +829,12 @@ }, "lanzaboote": { "inputs": { - "crane": "crane", + "crane": "crane_2", "nixpkgs": [ "nixpkgs" ], "pre-commit": "pre-commit", - "rust-overlay": "rust-overlay" + "rust-overlay": "rust-overlay_2" }, "locked": { "lastModified": 1785749642, @@ -636,13 +850,29 @@ "type": "github" } }, + "litellm": { + "flake": false, + "locked": { + "lastModified": 1784557849, + "narHash": "sha256-P+MjkZGM3SJ97MUUO/bshSxbxYOz8Nhk9YWmmJxF7Jg=", + "owner": "BerriAI", + "repo": "litellm", + "rev": "34561482ed092d78c296cab7999486022af5a938", + "type": "github" + }, + "original": { + "owner": "BerriAI", + "repo": "litellm", + "type": "github" + } + }, "llm-agents": { "inputs": { - "bun2nix": "bun2nix_2", - "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_4", - "systems": "systems_5", - "treefmt-nix": "treefmt-nix_2" + "bun2nix": "bun2nix_3", + "flake-parts": "flake-parts_5", + "nixpkgs": "nixpkgs_6", + "systems": "systems_6", + "treefmt-nix": "treefmt-nix_4" }, "locked": { "lastModified": 1786078118, @@ -658,9 +888,25 @@ "type": "github" } }, + "models-dev": { + "flake": false, + "locked": { + "lastModified": 1784558110, + "narHash": "sha256-LVjk4+i/yLubv73TklESdOkAngANmOqy3ylONTx+/a8=", + "owner": "anomalyco", + "repo": "models.dev", + "rev": "c5962a12f7ac6ada0f2eb9f35fbcede33200f555", + "type": "github" + }, + "original": { + "owner": "anomalyco", + "repo": "models.dev", + "type": "github" + } + }, "nani-translate-linux": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1785857772, @@ -680,7 +926,7 @@ "inputs": { "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_8", "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" @@ -753,9 +999,24 @@ "type": "github" } }, + "nix-filter": { + "locked": { + "lastModified": 1757882181, + "narHash": "sha256-+cCxYIh2UNalTz364p+QYmWHs0P+6wDhiWR4jDIKQIU=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "59c44d1909c72441144b93cf0f054be7fe764de5", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "nix-filter", + "type": "github" + } + }, "nix-hazkey": { "inputs": { - "home-manager": "home-manager_3", + "home-manager": "home-manager_4", "nixpkgs": [ "nixpkgs" ] @@ -796,7 +1057,7 @@ }, "nixos-hardware": { "inputs": { - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_9" }, "locked": { "lastModified": 1785232496, @@ -815,8 +1076,8 @@ }, "nixos-wsl": { "inputs": { - "flake-compat": "flake-compat_4", - "nixpkgs": "nixpkgs_8" + "flake-compat": "flake-compat_5", + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1784642409, @@ -849,6 +1110,21 @@ } }, "nixpkgs-lib": { + "locked": { + "lastModified": 1782614948, + "narHash": "sha256-ePjCwr1sNm9NYUqywL7QfK3JnlS015msC+eBu2zKlp8=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "db3f255737b94216eb71cce308e2912cf6bc2d7c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-lib_2": { "locked": { "lastModified": 1785031560, "narHash": "sha256-OmshNvn2vupOFpYinLUu+1Dnpu4n7Q5N3ggGVNHpkUI=", @@ -863,7 +1139,7 @@ "type": "github" } }, - "nixpkgs-lib_2": { + "nixpkgs-lib_3": { "locked": { "lastModified": 1769909678, "narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=", @@ -927,6 +1203,38 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1783776592, + "narHash": "sha256-UgCQzxeWI75XM8G+hPrPh+MKzEPjG3SpAj7dtqSbksA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e7a3ca8092b61ff85b6a45bf863ea2b2d6a661b3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1785989512, + "narHash": "sha256-HFQhkQcl5D1hUNoen3SGHCSFCt2Bg6uP+HgbrnA3InQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "445d861c6d31b4af0c79d8d4be2331f762a361d7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-26.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_12": { "locked": { "lastModified": 1785571196, "narHash": "sha256-xwSqxTsama0YTtS78+4YyCm6jJg09v78QWfP1cAyoVA=", @@ -939,7 +1247,7 @@ "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" } }, - "nixpkgs_11": { + "nixpkgs_13": { "locked": { "lastModified": 1770107345, "narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=", @@ -955,7 +1263,7 @@ "type": "github" } }, - "nixpkgs_12": { + "nixpkgs_14": { "locked": { "lastModified": 1772542754, "narHash": "sha256-WGV2hy+VIeQsYXpsLjdr4GvHv5eECMISX1zKLTedhdg=", @@ -971,7 +1279,7 @@ "type": "github" } }, - "nixpkgs_13": { + "nixpkgs_15": { "locked": { "lastModified": 1778869304, "narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=", @@ -988,6 +1296,38 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1784842214, + "narHash": "sha256-5RtCAzg/n1n2Yp0mtDiZzZFJzvqR4jHleWeqD7b5G14=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "91cc1fdf6831e29b6c98768e721a72241f3d0797", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1785967620, + "narHash": "sha256-IItrdb7Puk05RqOBWZYFC5X6Wl1sJmCfh5MWVHw5iMM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b7c2ada94fe99c15b0dbcf4d11fd7850b957a436", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1782545840, "narHash": "sha256-CAi8oAZaE6pTkcYQBnnOlvmfMgG/p1AO0FohKKN3J7I=", @@ -1000,7 +1340,7 @@ "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, - "nixpkgs_3": { + "nixpkgs_5": { "locked": { "lastModified": 1782918843, "narHash": "sha256-ETYnV9U7Sr+A45dohzZdfCZKOss4qrTkO+wgNZNvEc0=", @@ -1016,7 +1356,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_6": { "locked": { "lastModified": 1785747939, "narHash": "sha256-D740uKsMbgsfK2oaDenJLLPIZfq7W0/g4KN/Fls8eKs=", @@ -1032,7 +1372,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_7": { "locked": { "lastModified": 1785454630, "narHash": "sha256-LQy14TZp77TwbQf40gg1V3jo8FwJG0jGDkAH+zRHqg8=", @@ -1048,7 +1388,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_8": { "locked": { "lastModified": 1785828668, "narHash": "sha256-8fsyqeO+mJqvIzeO4xIpgJe/f7MTbbVTEC6RT6WSXNs=", @@ -1064,7 +1404,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_9": { "locked": { "lastModified": 1767892417, "narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=", @@ -1077,45 +1417,13 @@ "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" } }, - "nixpkgs_8": { - "locked": { - "lastModified": 1783776592, - "narHash": "sha256-UgCQzxeWI75XM8G+hPrPh+MKzEPjG3SpAj7dtqSbksA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e7a3ca8092b61ff85b6a45bf863ea2b2d6a661b3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_9": { - "locked": { - "lastModified": 1785989512, - "narHash": "sha256-HFQhkQcl5D1hUNoen3SGHCSFCt2Bg6uP+HgbrnA3InQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "445d861c6d31b4af0c79d8d4be2331f762a361d7", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-26.05", - "repo": "nixpkgs", - "type": "github" - } - }, "nixvim": { "inputs": { - "flake-parts": "flake-parts_4", + "flake-parts": "flake-parts_6", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1782919967, @@ -1134,7 +1442,7 @@ }, "noctalia": { "inputs": { - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_12" }, "locked": { "lastModified": 1786061077, @@ -1178,7 +1486,7 @@ }, "pre-commit": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "nixpkgs": [ "lanzaboote", "nixpkgs" @@ -1202,12 +1510,13 @@ "inputs": { "browser-previews": "browser-previews", "codex-desktop-linux": "codex-desktop-linux", + "codex-session-usage": "codex-session-usage", "disko": "disko", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_3", "ghostty": "ghostty", "git-hooks-nix": "git-hooks-nix", "handy": "handy", - "home-manager": "home-manager_2", + "home-manager": "home-manager_3", "lanzaboote": "lanzaboote", "llm-agents": "llm-agents", "nani-translate-linux": "nani-translate-linux", @@ -1217,21 +1526,43 @@ "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_11", "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim", "noctalia": "noctalia", "services-flake": "services-flake", "sops-nix": "sops-nix", "stylix": "stylix", - "systems": "systems_8", - "treefmt-nix": "treefmt-nix_3", + "systems": "systems_9", + "treefmt-nix": "treefmt-nix_5", "vicinae": "vicinae", "vicinae-extensions": "vicinae-extensions", "window-overview": "window-overview" } }, "rust-overlay": { + "inputs": { + "nixpkgs": [ + "codex-session-usage", + "ccusage", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1784526465, + "narHash": "sha256-L37teKC6oINWG4PGZLIqbphMWvSQ0PEz+aWxAk+rIDw=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "58c6334db52d51fc5dd8877c90b01f00cf8a696b", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_2": { "inputs": { "nixpkgs": [ "lanzaboote", @@ -1289,7 +1620,7 @@ }, "soulver-cpp": { "inputs": { - "nixpkgs": "nixpkgs_13", + "nixpkgs": "nixpkgs_15", "nixpkgs-libxml2": "nixpkgs-libxml2" }, "locked": { @@ -1313,13 +1644,13 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts_5", + "flake-parts": "flake-parts_7", "gnome-shell": "gnome-shell", "nixpkgs": [ "nixpkgs" ], "nur": "nur", - "systems": "systems_7", + "systems": "systems_8", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", "tinted-tmux": "tinted-tmux", @@ -1369,6 +1700,21 @@ "type": "github" } }, + "systems_11": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "systems_2": { "locked": { "lastModified": 1681028828, @@ -1385,22 +1731,22 @@ } }, "systems_3": { - "flake": false, "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1776166891, + "narHash": "sha256-bI8yrEGjrohR5hkQox7UrxDH7XqrYMwI8SL/LrJ1+S8=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "triplet", + "rev": "6de7bc09397911ce03636afbcf6118745ab2cda0", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "triplet", "type": "github" } }, "systems_4": { + "flake": false, "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1446,6 +1792,21 @@ } }, "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_8": { "locked": { "lastModified": 1774449309, "narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=", @@ -1461,21 +1822,6 @@ "type": "github" } }, - "systems_8": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "systems_9": { "locked": { "lastModified": 1681028828, @@ -1556,6 +1902,51 @@ } }, "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "codex-session-usage", + "ccusage", + "bun2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1784369104, + "narHash": "sha256-47cxbcZODibHv3rELFQ9vZly0vUNkND/atn/U7HLeb0=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "df3c0640565d04a0261253cdd89fce78ec50168a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "codex-session-usage", + "ccusage", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1784369104, + "narHash": "sha256-47cxbcZODibHv3rELFQ9vZly0vUNkND/atn/U7HLeb0=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "df3c0640565d04a0261253cdd89fce78ec50168a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_3": { "inputs": { "nixpkgs": [ "handy", @@ -1577,7 +1968,7 @@ "type": "github" } }, - "treefmt-nix_2": { + "treefmt-nix_4": { "inputs": { "nixpkgs": [ "llm-agents", @@ -1598,9 +1989,9 @@ "type": "github" } }, - "treefmt-nix_3": { + "treefmt-nix_5": { "inputs": { - "nixpkgs": "nixpkgs_11" + "nixpkgs": "nixpkgs_13" }, "locked": { "lastModified": 1785945821, @@ -1618,9 +2009,9 @@ }, "vicinae": { "inputs": { - "nixpkgs": "nixpkgs_12", + "nixpkgs": "nixpkgs_14", "soulver-cpp": "soulver-cpp", - "systems": "systems_9" + "systems": "systems_10" }, "locked": { "lastModified": 1785823793, @@ -1638,11 +2029,11 @@ }, "vicinae-extensions": { "inputs": { - "flake-compat": "flake-compat_5", + "flake-compat": "flake-compat_6", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_10", + "systems": "systems_11", "vicinae": "vicinae_2" }, "locked": { diff --git a/flake.nix b/flake.nix index 69800a0..3e91e3e 100644 --- a/flake.nix +++ b/flake.nix @@ -102,6 +102,8 @@ url = "github:ilysenko/codex-desktop-linux"; }; + codex-session-usage.url = "github:moons-14/codex-session-usage"; + # Index / Search nix-index-database = { url = "github:nix-community/nix-index-database"; diff --git a/modules/applications/codex-session-usage/home.nix b/modules/applications/codex-session-usage/home.nix new file mode 100644 index 0000000..0b3c379 --- /dev/null +++ b/modules/applications/codex-session-usage/home.nix @@ -0,0 +1,52 @@ +{ + lib, + pkgs, + inputs, + ... +}: +let + codexSessionUsage = inputs.codex-session-usage.packages.${pkgs.stdenv.hostPlatform.system}.default; +in +{ + home.packages = [ codexSessionUsage ]; + + xdg.dataFile = { + "vicinae/scripts/codex-session-usage/start" = { + executable = true; + text = '' + #!${lib.getExe pkgs.bash} + # @vicinae.schemaVersion 1 + # @vicinae.title Start Codex Session Usage + # @vicinae.description Start the local Codex session usage dashboard + # @vicinae.mode compact + # @vicinae.icon 📊 + # @vicinae.argument1 { "type": "text", "placeholder": "Port (optional)", "optional": true } + + if [[ -z "$1" ]]; then + exec ${lib.getExe codexSessionUsage} start + fi + + if [[ "$1" =~ ^[0-9]+$ ]] && (( 10#$1 >= 1 && 10#$1 <= 65535 )); then + exec ${lib.getExe codexSessionUsage} start --port "$1" + fi + + printf '%s\n' 'Port must be an integer between 1 and 65535.' >&2 + exit 2 + ''; + }; + + "vicinae/scripts/codex-session-usage/stop" = { + executable = true; + text = '' + #!${lib.getExe pkgs.bash} + # @vicinae.schemaVersion 1 + # @vicinae.title Stop Codex Session Usage + # @vicinae.description Stop the local Codex session usage dashboard + # @vicinae.mode compact + # @vicinae.icon 📊 + + exec ${lib.getExe codexSessionUsage} stop + ''; + }; + }; +} diff --git a/modules/profiles/workload/development/meta.nix b/modules/profiles/workload/development/meta.nix index 65edf3d..c2ac9f6 100644 --- a/modules/profiles/workload/development/meta.nix +++ b/modules/profiles/workload/development/meta.nix @@ -6,6 +6,7 @@ "applications.claude" "applications.codex" "applications.codex-desktop" + "applications.codex-session-usage" "applications.docker" "applications.drawio" "applications.ghostty"