Skip to content

refactor: extract option definitions into separate files#21

Merged
vic merged 1 commit into
mainfrom
opts
Jul 20, 2025
Merged

refactor: extract option definitions into separate files#21
vic merged 1 commit into
mainfrom
opts

Conversation

@vic
Copy link
Copy Markdown
Member

@vic vic commented Jul 20, 2025

  • Create modules/_options/ directory with individual option files
  • Split large options.nix into modular components:
    • do-not-edit.nix: header comment option
    • formatter.nix: flake formatter configuration
    • inputs.nix: flake inputs with follows support
    • outputs.nix: outputs function configuration
    • prune-lock.nix: lock pruning options
  • Simplify main options.nix using dynamic imports
  • Improve code organization and maintainability

Copilot AI review requested due to automatic review settings July 20, 2025 05:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This refactoring extracts option definitions from a monolithic options.nix file into separate modular files organized in a modules/_options/ directory. The change improves code organization and maintainability by splitting large configuration definitions into focused, single-responsibility modules.

Key changes:

  • Split large options.nix into 5 separate option modules (do-not-edit, formatter, inputs, outputs, prune-lock)
  • Implement dynamic imports using lib.pipe to reconstruct the options structure
  • Maintain existing functionality while improving code organization

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
modules/options.nix Refactored to use dynamic imports from separate option files
modules/_options/do-not-edit.nix Extracted header comment option definition
modules/_options/formatter.nix Extracted flake formatter configuration option
modules/_options/inputs.nix Extracted flake inputs option with follows support
modules/_options/outputs.nix Extracted outputs function configuration option
modules/_options/prune-lock.nix Extracted lock pruning option definition

Comment thread modules/_options/formatter.nix Outdated
Comment thread modules/_options/prune-lock.nix Outdated
- Create modules/_options/ directory with individual option files
- Split large options.nix into modular components:
  - do-not-edit.nix: header comment option
  - formatter.nix: flake formatter configuration
  - inputs.nix: flake inputs with follows support
  - outputs.nix: outputs function configuration
  - prune-lock.nix: lock pruning options
- Simplify main options.nix using dynamic imports
- Improve code organization and maintainability
@vic vic merged commit 997ece2 into main Jul 20, 2025
5 checks passed
@vic vic deleted the opts branch July 20, 2025 05:29
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.

2 participants