Skip to content

Conversation

@ryoppippi
Copy link
Member

@ryoppippi ryoppippi commented Jan 31, 2026

Summary

  • Replace git-hooks.flakeModule and treefmt-nix.flakeModule imports with direct lib usage
  • Use treefmt-nix.lib.evalModule and git-hooks.lib.${system}.run directly
  • Add formatter output for nix fmt support

Test plan

  • nix flake check passes
  • Pre-commit hooks still work (gitleaks, treefmt, ty)

Summary by cubic

Refactor Nix flake to remove git-hooks/treefmt flakeModule imports and use their libs directly. Adds a formatter output for nix fmt with no behavior change to formatting or hooks.

  • Refactors

    • Use treefmt-nix.lib.evalModule and git-hooks.lib.${system}.run directly.
    • Expose formatter output and use the treefmt wrapper in hooks.
    • Switch devShell hook install to pre-commit-check.shellHook; keep gitleaks, treefmt, and ty.
  • Dependencies

    • Update git-hooks.nix and treefmt-nix revisions in flake.lock.

Written for commit 17fc048. Summary will update on new commits.

Replace git-hooks.flakeModule and treefmt-nix.flakeModule imports with
direct usage of treefmt-nix.lib.evalModule and git-hooks.lib.${system}.run.

This approach is cleaner and avoids the implicit module system overhead
while maintaining the same functionality:
- treefmt formatting with nixfmt, ruff, and oxfmt
- pre-commit hooks for gitleaks, treefmt, and ty
- formatter output for nix fmt
Copilot AI review requested due to automatic review settings January 31, 2026 21:49
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@ryoppippi ryoppippi merged commit c53a85d into main Jan 31, 2026
23 checks passed
@ryoppippi ryoppippi deleted the refactor/remove-flake-module branch January 31, 2026 21:53
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.

1 participant