Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the flake generation system by introducing a hooks-based architecture and converting options to proper NixOS modules. The key change replaces hardcoded prune-lock logic with a configurable hooks system that allows extensible write and check operations.
- Converts option files from simple option definitions to proper NixOS modules with options namespace
- Introduces write-hooks and check-hooks systems for extensible flake generation and validation
- Refactors the formatter option to use package type instead of command string for better type safety
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| modules/write-flake.nix | Restructured to use hooks system instead of hardcoded prune-lock logic |
| modules/options.nix | Simplified to import individual option modules instead of inline definitions |
| modules/options/*.nix | New proper NixOS modules for each option with options namespace |
| modules/_options/*.nix | Removed old option files that returned raw option definitions |
…ystem - Move options from _options/ to options/ directory - Convert all option files to proper flake-parts modules with options namespace - Introduce hooks system for extensible write and check operations: - write-hooks: run during flake generation on working copy - check-hooks: run during flake validation on temporary copy - Refactor prune-lock to use hooks system instead of hardcoded logic - Update formatter option to use package type instead of command string - Simplify write-flake.nix using new hooks architecture - Replace hardcoded prune-lock logic with configurable hook system BREAKING CHANGE: The formatter is now expected to return a package with meta.mainProgram, the old behavior expected a command string.
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.
BREAKING CHANGE: The formatter is now expected to return a package with meta.mainProgram,
the old behavior expected a command string.