refactor(nix): remove flakeModule in favour of direct lib usage#135
Merged
refactor(nix): remove flakeModule in favour of direct lib usage#135
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git-hooks.flakeModuleandtreefmt-nix.flakeModuleimports with direct lib usagetreefmt-nix.lib.evalModuleandgit-hooks.lib.${system}.rundirectlyformatteroutput fornix fmtsupportTest plan
nix flake checkpassesSummary 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
Dependencies
Written for commit 17fc048. Summary will update on new commits.