Skip to content

feat(apply): add --eval-only flag #193

Merged
water-sucks merged 3 commits intonix-community:mainfrom
iyiola-dev:main
Feb 26, 2026
Merged

feat(apply): add --eval-only flag #193
water-sucks merged 3 commits intonix-community:mainfrom
iyiola-dev:main

Conversation

@iyiola-dev
Copy link
Copy Markdown
Contributor

Add a new --eval-only flag that evaluates the NixOS configuration without building or activating it. This is useful for quickly checking that a configuration evaluates successfully.

  • Add --eval-only flag to apply command with mutual exclusivity checks
  • Implement EvalSystem method for both flake and legacy configurations
  • Add default alias eval for nixos apply --eval-only
  • Document the new flag and alias in man

Copy link
Copy Markdown
Collaborator

@water-sucks water-sucks left a comment

Choose a reason for hiding this comment

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

A good start! Appreciate the fast turnaround on this.

@water-sucks water-sucks linked an issue Feb 22, 2026 that may be closed by this pull request
1 task
Copy link
Copy Markdown
Collaborator

@water-sucks water-sucks left a comment

Choose a reason for hiding this comment

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

Some more small changes and this should be good to go :}

…uilding

Add a new `--eval-only` flag that evaluates the NixOS configuration without building or activating it. This is useful for quickly checking that a configuration evaluates successfully.

- Add `--eval-only` flag to apply command with mutual exclusivity checks
- Implement `EvalSystem` method for both flake and legacy configurations
- Add default alias `eval` for `nixos apply --eval-only`
- Document the new flag and alias in man
- Remove manual mutual exclusivity checks for --eval-only flag
- Use MarkFlagsMutuallyExclusive for --eval-only and --store-path
- Pass localSystem and buildType to EvalSystem method
- Update EvalSystem to use system.CommandRunner instead of exec.Command
- Remove unused CmdFlags and Env fields from SystemEvalOptions
- Remove mention of 'eval' alias from
Copy link
Copy Markdown
Collaborator

@water-sucks water-sucks left a comment

Choose a reason for hiding this comment

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

Thanks! Appreciate the time taken for this.

@water-sucks water-sucks merged commit 8a2f5b8 into nix-community:main Feb 26, 2026
2 checks passed
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.

apply: support evaluating a nix config and exiting

3 participants