Re-work flake.nix#2
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughEnables direnv flake usage, pins minnows-related inputs, replaces flake-utils eachDefaultSystem with explicit per-system pkgs and minnowsSystems generation, emits per-system apps/devShells/checks/packages, defines an overlay that builds the crate via crane using Cargo metadata, updates Cargo edition to 2024, and consolidates CI into a matrix. ChangesNix Flake Modernization
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@flake.nix`:
- Around line 61-63: The dev shell references a missing checks output via the
attribute self.checks.${system} in the block starting with default =
pkgs.craneLib.devShell { checks = self.checks.${system}; } — either restore a
top-level checks output that provides a per-system attribute set named by
${system} (so self.checks.${system} exists), or remove/replace the checks
assignment in the devShell call (e.g., omit checks or pass an empty/default
attrset) so the dev shell no longer depends on the nonexistent
self.checks.${system}; update the flake outputs accordingly and ensure any
dependent code that expected checks is updated to match the chosen approach.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 31255c37-40e2-4b03-953c-dd5f863f0717
⛔ Files ignored due to path filters (1)
flake.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
.envrcflake.nix
colemickens
left a comment
There was a problem hiding this comment.
Looks mostly fine but I do agree with CodeRabbit, we lost the Rust package checks with this change. Not essential, but I'd kind of like to keep them?
|
Yeah, I suppose the Rust service will probably end up being more ambitious than this 😀 I'll add those. |
|
@colemickens I ported over the clippy and format checks. The nextest and Taplo checks didn't seem so useful in this context. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
flake.nix (1)
78-86: 💤 Low valueConsider adding
defaultapp for convenience.
packages.defaultis defined, butapps.defaultis not, meaningnix runwon't work without specifying.#hello-minnows.Suggested addition
apps = forEachSupportedSystem ( { pkgs, ... }: { + default = self.apps.${system}.hello-minnows; hello-minnows = { type = "app"; program = lib.getExe pkgs.hello-minnows; }; } );🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@flake.nix` around lines 78 - 86, Add a default app mapping so `nix run` works without specifying .#hello-minnows: in the apps block produced by forEachSupportedSystem, add an entry named "default" that points to the same program as "hello-minnows" (use the same lib.getExe pkgs.hello-minnows reference or an alias to it) so apps.default exists alongside apps.hello-minnows; ensure you reuse the existing pkgs/hello-minnows symbol and keep forEachSupportedSystem behavior consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@flake.nix`:
- Around line 78-86: Add a default app mapping so `nix run` works without
specifying .#hello-minnows: in the apps block produced by
forEachSupportedSystem, add an entry named "default" that points to the same
program as "hello-minnows" (use the same lib.getExe pkgs.hello-minnows reference
or an alias to it) so apps.default exists alongside apps.hello-minnows; ensure
you reuse the existing pkgs/hello-minnows symbol and keep forEachSupportedSystem
behavior consistent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d545fbe9-91a1-46f9-9501-6730dcbcd444
📒 Files selected for processing (4)
Cargo.tomldeny.tomlflake.nixtaplo.toml
💤 Files with no reviewable changes (2)
- deny.toml
- taplo.toml
✅ Files skipped from review due to trivial changes (1)
- Cargo.toml
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yaml:
- Around line 21-25: CI workflow uses floating tags for third-party actions;
replace the two occurrences of DeterminateSystems/determinate-nix-action@main
and DeterminateSystems/flakehub-cache-action@main with their respective
40-character commit SHAs (immutably pin both actions) so the workflow references
exact commits instead of `@main`; update both action lines to use the full commit
SHAs and keep the existing with: persist-credentials setting unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 265eef91-f119-4a79-9797-0bb0d7770193
📒 Files selected for processing (2)
.github/workflows/ci.yamlflake.nix
🚧 Files skipped from review as they are similar to previous changes (1)
- flake.nix
This overhauls the flake to be more like the standard DetSys model.
Summary by CodeRabbit