Skip to content

Conversation

@ryoppippi
Copy link
Owner

@ryoppippi ryoppippi commented Jan 9, 2026

Simplify flake.nix by removing flake-parts and using plain Nix. The project only defines a single devShell, which doesn't require the complexity of flake-parts.

Multi-system support is achieved with a simple forAllSystems helper using nixpkgs.lib.genAttrs. This reduces dependencies and makes the flake more straightforward.

Summary by CodeRabbit

  • Chores
    • Simplified development environment configuration structure to improve consistency and maintainability across supported platforms.

✏️ Tip: You can customize this high-level summary in your review settings.

Simplify flake.nix by removing flake-parts and using plain Nix.
The project only defines a single devShell, which doesn't require
the complexity of flake-parts. Multi-system support is achieved
with a simple forAllSystems helper using nixpkgs.lib.genAttrs.

This reduces dependencies and makes the flake more straightforward.
@coderabbitai
Copy link

coderabbitai bot commented Jan 9, 2026

📝 Walkthrough

Walkthrough

This PR refactors flake.nix by removing the flake-parts dependency and replacing the complex mkFlake outputs structure with a simplified declarative approach. A custom forAllSystems helper function is introduced to generate per-system devShells across the four target platforms.

Changes

Cohort / File(s) Summary
Flake structure refactor
flake.nix
Removed flake-parts dependency and replaced flake-parts.lib.mkFlake with a flat declarative outputs block. Introduced top-level let bindings containing systems array and forAllSystems generator function to replace the perSystem pattern. Per-system devShells.default now constructed via forAllSystems helper instead of nested function composition.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A rabbit hops through Nix with glee,
Removes the parts that needn't be,
With forAllSystems, clean and bright,
Four systems shine—a simpler sight! 🐰✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'chore: remove flake-parts dependency' directly and accurately summarizes the main change: removing the flake-parts dependency from flake.nix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 232d6b9 and e0ee783.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • flake.nix
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Workers Builds: ccusage-guide
🔇 Additional comments (3)
flake.nix (3)

4-4: LGTM: Simplified inputs declaration.

The direct field assignment is cleaner for a single input and successfully removes the flake-parts dependency.


6-10: LGTM: Well-implemented forAllSystems helper.

The custom forAllSystems helper correctly uses nixpkgs.lib.genAttrs to generate per-system outputs. The implementation f nixpkgs.legacyPackages.${system} properly passes the package set for each system, which is the standard approach for simplified flakes.


11-33: LGTM: Correct devShells structure and successful refactoring.

The devShells output correctly uses the forAllSystems helper to generate the required devShells.<system>.default structure. The refactoring successfully removes flake-parts while maintaining equivalent functionality with a more straightforward implementation. Well done!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
ccusage-guide e0ee783 Jan 09 2026, 11:36 PM

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 9, 2026

Open in StackBlitz

@ccusage/amp

npm i https://pkg.pr.new/ryoppippi/ccusage/@ccusage/amp@793

ccusage

npm i https://pkg.pr.new/ryoppippi/ccusage@793

@ccusage/codex

npm i https://pkg.pr.new/ryoppippi/ccusage/@ccusage/codex@793

@ccusage/mcp

npm i https://pkg.pr.new/ryoppippi/ccusage/@ccusage/mcp@793

@ccusage/opencode

npm i https://pkg.pr.new/ryoppippi/ccusage/@ccusage/opencode@793

@ccusage/pi

npm i https://pkg.pr.new/ryoppippi/ccusage/@ccusage/pi@793

commit: e0ee783

@ryoppippi ryoppippi merged commit 32bfac7 into main Jan 9, 2026
16 of 17 checks passed
@ryoppippi ryoppippi deleted the chore/remove-flake-parts branch January 9, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants