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

system/checks: allow disabling the buildUsers check #681

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

cole-h
Copy link
Contributor

@cole-h cole-h commented Jun 6, 2023

This makes it possible for people who are using the auto-allocate-uids experimental feature (available since 2.12.0) to install nix-darwin! Otherwise, this check will fail because, predictably, there are no build users as they're allocated at build-time.

@cole-h cole-h force-pushed the auto-uid branch 3 times, most recently from a08775f to 3f25f86 Compare June 6, 2023 01:40
@cole-h
Copy link
Contributor Author

cole-h commented Jun 6, 2023

Now that I think about it, it might be better to just allow disabling this check altogether rather than doing heuristics that may not hold.

This allows systems with auto-allocate-uids enabled to work (by
disabling this check).
@cole-h cole-h changed the title system/checks: support systems with auto-allocate-uids enabled system/checks: allow disabling the buildUsers check Jun 6, 2023
@roman
Copy link

roman commented Jun 7, 2023

@domenkozar can we prioritize merging this, please? ☝️

On newer installs via DeterminateSystems/nix-installer nix-darwin fails miserably

@domenkozar domenkozar merged commit 40e4b85 into LnL7:master Jun 8, 2023
6 checks passed
@bestlem
Copy link

bestlem commented Jun 8, 2023

I think the default has to be don't do the check.

The reason is how do you turn the check off - that is not in the documentation.

I ended up commenting out the check line. as even with this patch it still fails.

@cole-h cole-h deleted the auto-uid branch June 8, 2023 13:00
@cole-h
Copy link
Contributor Author

cole-h commented Jun 9, 2023

You turn the check off by setting system.checks.verifyBuildUsers = false; in your nix-darwin config somewhere.

@bestlem
Copy link

bestlem commented Jun 9, 2023

The install I was doing was install nix and then nix-darwin and only then look at config.

@cole-h
Copy link
Contributor Author

cole-h commented Jun 9, 2023

You'll want to follow the instructions for installing nix-darwin from here: https://github.com/LnL7/nix-darwin#flakes-experimental

Specifically, you create your nix-darwin config, then you build it on your darwin machine, and then you use the darwin-rebuild script in that built darwin configuration to complete the switch.

mirkolenz added a commit to mirkolenz/nixos that referenced this pull request Jun 10, 2023
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.

None yet

4 participants