Migrate from flake-utils to flake-parts#21
Conversation
- Replace flake-utils with flake-parts for better modularity - Restructure flake.nix to use flake-parts' module system - Keep all existing functionality intact (packages, apps, checks, etc) - Maintain platform-specific constraints for CUDA and Docker images - Update flake.lock with new dependencies
Code Review - Migration from flake-utils to flake-partsSummaryThis PR successfully migrates from ✅ Strengths
🔍 Observations & Minor Considerations1. Redundant
|
- Add CHANGELOG.md following Keep a Changelog format - Add clarifying comments to flake.nix explaining cross-platform pkgs instances - Pin nixpkgs to known-good revision (avoids test failures in newer versions)
Code Review: Migration from flake-utils to flake-partsI've reviewed this PR and overall it's a well-executed refactoring that improves the flake's modularity and maintainability. Here's my detailed feedback: ✅ Strengths
🔍 Issues Found1. Interface Change in nix/apps.nix (IMPORTANT)Location: nix/apps.nix:2-3 The interface changed from: { pkgs, packages }to: { pkgs, packages } # but packages = self'.packages instead of plain packagesWhile this works, it's an implicit breaking change. The Impact: Low (internal module, but could break if someone uses this as a template) Recommendation: Either:
2. Similar Issue in nix/checks.nixLocation: nix/checks.nix:4 Changed from 3. CHANGELOG Version MismatchLocation: CHANGELOG.md:8-11 The changelog shows this as Recommendation: Clarify the release strategy before merging. 4. Potential Redundant pkgs ConfigurationLocation: flake.nix:158-166 The Existing: # aarch64-linux needs this workaround for kornia-rs
allowUnsupportedSystem = system == "aarch64-linux";Better: # aarch64-linux needs this workaround for kornia-rs badPlatforms issue
# This applies to both native builds and cross-compilation targets
allowUnsupportedSystem = system == "aarch64-linux";💡 Suggestions
🔒 Security & Performance
📝 Code Quality
🎯 RecommendationAPPROVE with minor suggestions This is a solid refactoring that modernizes the flake architecture. The migration is correct and well-documented. The only real concern is the undocumented interface change in nix/apps.nix and nix/checks.nix, but since these are internal modules, it's not a breaking change for users. Before merging, please:
Great work on this migration! 🎉 |
- Add comment explaining supported systems and CUDA availability - Version CHANGELOG entry as v0.7.0-2 for flake-parts migration - Note improved inline documentation in changelog
Code Review: Migration from flake-utils to flake-partsThis PR successfully migrates the flake from ✅ Strengths
📝 Observations & Minor Suggestions
🔍 Potential Concerns
🎯 Best Practices Validation✅ Nix Code Style: Properly formatted with nixfmt-rfc-style 🚀 RecommendationApprove with minor suggestions: This is a high-quality refactoring that improves the project's maintainability and aligns with modern Nix ecosystem practices. The migration to flake-parts is well-executed and properly documented. Before merging:
After merging:
📚 ReferencesGreat work on this migration! 🎉 |
Summary
This PR migrates the flake from using
flake-utilstoflake-partsfor better modularity and composability.Changes
flake-utilsinput withflake-partsflake.nixto use flake-parts' module systemBenefits
Testing
nix flake show- All outputs correctly exposednix flake check- All checks passnix build- Package builds successfullyMigration Notes
This is a pure refactoring with no functional changes. All existing commands and workflows remain the same.