Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nix] Add DetSys installer behind feature flag #2303

Merged
merged 6 commits into from
Sep 25, 2024

Conversation

mikeland73
Copy link
Contributor

@mikeland73 mikeland73 commented Sep 25, 2024

Summary

  • Adds detsys installer.
  • Puts it behind disabled flag. Add CICD matrix to test.
  • Special casing: Handles missing systemd by just skipping it.

How was it tested?

  • Tested devbox setup nix in linux docker container.
  • Will test in CICD
  • Much more testing needed before removing feature flag

@mikeland73 mikeland73 requested review from savil and Lagoja September 25, 2024 18:47
// Should we pin version? Or just trust detsys
installScript = "curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install"
if isLinuxWithoutSystemd() {
installScript += " linux --init none"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I presume this is to manage the nix daemon.
How does the nix daemon get started without this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My understanding from the DetSys docs is that this makes it root only but will still work.

There are a few alternatives to this:

  • Warn and give user options (e.g. install systemd or use new --root-only)
  • Warn and install anyway

Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like they'll then need to run sudo to run devbox. I think emitting a warning (with a suggestion to install systemd and re-using the detsys installer manually) and continuing to install seems okay to minimize friction. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not quite, user needs sudo only if not root, so at least some cases (e.g. ubuntu dockerfile) work pretty well as is.

That said, printing a message is very low friction. I'm not 100% sure re-running detsys installation would fix it, I need to experiment a bit more.

@mikeland73 mikeland73 merged commit 58ed80e into main Sep 25, 2024
28 checks passed
@mikeland73 mikeland73 deleted the landau/detsys-installer branch September 25, 2024 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants