Skip to content

Conversation

@sestrella
Copy link
Contributor

@sestrella sestrella commented Nov 20, 2025

The command example in the README file to install upstream Nix is not up to date, because the default distribution when --prefer-upstream-nix is not passed to install is Distribution::DeterminateNix.

pub fn distribution(&self) -> Distribution {
if self.determinate_nix {
Distribution::DeterminateNix
} else if self.prefer_upstream {
// If the user passed --prefer-upstream (or it defaults to true), default back to Nix
Distribution::Nix
} else {
Distribution::DeterminateNix
}
}
}

Future Changes?

Given that Distribution::DeterminateNix is the default distribution and the installer only supports two distributions for the time being, the logic to determine which distribution to install could be simplified a bit by removing the --determinate flag.

if self.prefer_upstream {
  Distribution::Nix
} else {
  Distribution::DeterminateNix
}

Additionally, a more general flag like --distribution <determinate|upstream> could be used instead of --determinate and --prefer-upstream-nix to allow for greater flexibility in the future. This could be addressed in a separate PR if the proposed changes make sense, as the primary goal of this one was to update the documentation.

Summary by CodeRabbit

  • Documentation
    • Updated example command in README with the --prefer-upstream-nix flag option.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

Walkthrough

The README.md documentation is updated to include the --prefer-upstream-nix flag in an example curl command for upstream Nix installations. This reflects an available CLI option in the documentation without any code or behavioral changes.

Changes

Cohort / File(s) Summary
Documentation
README.md
Added --prefer-upstream-nix flag to example curl command

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested reviewers

  • cole-h
  • colemickens

Poem

🐰 A flag appears in docs so bright,
--prefer-upstream-nix takes flight!
Examples updated, crystal clear,
Users now know options here. 📖✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main documentation change: adding --prefer-upstream-nix flag to the install example in README.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sestrella sestrella changed the title docs: Passing --prefer-upstream-nix to install for upstream Nix docs: Passing --prefer-upstream-nix to install for upstream Nix Nov 20, 2025

```shell
curl -fsSL https://install.determinate.systems/nix | sh -s -- install
curl -fsSL https://install.determinate.systems/nix | sh -s -- install --prefer-upstream-nix
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for the fix!

@grahamc grahamc enabled auto-merge (squash) November 29, 2025 18:06
@grahamc grahamc merged commit 973787d into DeterminateSystems:main Nov 29, 2025
19 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.

2 participants