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

Utilising the Nix 2.12 features regarding builds #9

Closed
573 opened this issue Dec 22, 2022 · 2 comments
Closed

Utilising the Nix 2.12 features regarding builds #9

573 opened this issue Dec 22, 2022 · 2 comments

Comments

@573
Copy link

573 commented Dec 22, 2022

It would be nice to be able to adopt the new https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-allocate-uids and https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-use-cgroups in my ci build.

Is there a possibility to explain the background of the settings a bit and maybe come up with a minimal, i. e. but not neccessarily github-action, workflow file.

@infinisil
Copy link
Member

I'm thinking this would not be entirely suitable for a Nix hour. It seems like the docs are decently clear on what they do.

maybe come up with a minimal, i. e. but not neccessarily github-action, workflow file.

I don't think there's anything specific regarding CI with those features.

Why auto-allocate-uids? Traditionally you had to allocate separate build users for the Nix daemon, such that each parallel derivation build could use a separate user without the possibility of being able to access each others files. This then leads to the problem that if you have less allocated build users than cores on a system, you can't use all of them. By automatically allocating build users, they dynamically scale as necessary.

Why use-cgroups? That's explained in the PR that implements these two features: NixOS/nix#3600.

I hope that helps, let me know!

@infinisil
Copy link
Member

We might look into this a bit after all, because this week the topic is going to be various experimental features: #65!

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

No branches or pull requests

2 participants