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

Don't run preSwitchChecks during install #447

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

phaer
Copy link
Member

@phaer phaer commented Jan 7, 2025

NixOS includes an option called system.preSwitchChecks since NixOS/nixpkgs@6e192c4.

As we are installing a new system here, we do not care too much about the systems state pre switching and therefore disable those checks.

This change is motivated by nix-community/srvos#591 (comment)

untested, but this might help @Kranzes?

NixOS includes an option called `system.preSwitchChecks` since
NixOS/nixpkgs@6e192c4.

As we are installing a new system here, we do not care too much about the systems state pre-switching and therefore disable those checks. 

This change is motivated by nix-community/srvos#591 (comment)
@Kranzes
Copy link
Member

Kranzes commented Jan 7, 2025

I'd rather the workaround be done on the SrvOS side of things, if possible. Unless you think there will be more cases besides SrvOS for this?

@phaer
Copy link
Member Author

phaer commented Jan 7, 2025

Happy about alternative PRs! If you want to convince me, I'd need more of an argument as to why you think so.

Srvos already ships two mechanism by which to skip this check.

EXPECTED_HOSTNAME, which requires the target hostname that we don't have readily available.
And NIXOS_NO_CHECK which is used here as I couldn't come up with a preSwitchCheck that you would want to run during first install.

@phaer phaer marked this pull request as ready for review January 7, 2025 13:23
@Kranzes
Copy link
Member

Kranzes commented Jan 7, 2025

If you want to convince me, I'd need more of an argument as to why you think so.

You won. I don't have the energy LOL. I will test this PR later.

@zowoq
Copy link
Contributor

zowoq commented Jan 19, 2025

PR to improve installer detection: nix-community/srvos#601.

Probably a good idea to merge this PR anyway.

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.

3 participants