"Running builds with UID ranges requires the setting 'use-cgroups' to be enabled." #1154

Open
opened 2026-03-13 23:58:35 +00:00 by ncfavier · 3 comments

I ran into the following error after updating to Lix 2.94.0 and trying to build anything:

$ nix-build --quiet --expr '{}' --no-out-link
error: Running builds with UID ranges (setting `auto-allocate-uids` enabled and `8388608` UIDs) requires the setting 'use-cgroups' to be enabled.

I could not rebuild my config until I added cgroups to experimental-features and use-cgroups = true (or disabled auto-allocate-uids) in /etc/nix/nix.conf.

This does not happen on upstream Nix.

nix --version output

nix (Lix, like Nix) 2.94.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux, x86_64-v4-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/n/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/n/.nix-profile/etc/xdg/nix/nix.conf:/home/n/.local/state/nix/profile/etc/xdg/nix/nix.conf:/home/n/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/n/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/0zqbw17irvj0c71wn6cjbmcg2v04gzvd-lix-2.94.0/share

Relevant nix.conf:

allowed-users = *
auto-allocate-uids = true
auto-optimise-store = false
builders =
connect-timeout = 5
cores = 0
experimental-features = auto-allocate-uids nix-command flakes
keep-derivations = true
log-lines = 30
max-jobs = auto
require-sigs = true
sandbox = true
sandbox-fallback = false
system-features = nixos-test benchmark big-parallel kvm
trusted-users = root @wheel
I ran into the following error after updating to Lix 2.94.0 and trying to build anything: ``` $ nix-build --quiet --expr '{}' --no-out-link error: Running builds with UID ranges (setting `auto-allocate-uids` enabled and `8388608` UIDs) requires the setting 'use-cgroups' to be enabled. ``` I could not rebuild my config until I added `cgroups` to `experimental-features` and `use-cgroups = true` (or disabled `auto-allocate-uids`) in `/etc/nix/nix.conf`. This does not happen on upstream Nix. ## `nix --version` output ``` nix (Lix, like Nix) 2.94.0 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux, x86_64-v4-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/n/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/n/.nix-profile/etc/xdg/nix/nix.conf:/home/n/.local/state/nix/profile/etc/xdg/nix/nix.conf:/home/n/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/n/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/0zqbw17irvj0c71wn6cjbmcg2v04gzvd-lix-2.94.0/share ``` Relevant nix.conf: ``` allowed-users = * auto-allocate-uids = true auto-optimise-store = false builders = connect-timeout = 5 cores = 0 experimental-features = auto-allocate-uids nix-command flakes keep-derivations = true log-lines = 30 max-jobs = auto require-sigs = true sandbox = true sandbox-fallback = false system-features = nixos-test benchmark big-parallel kvm trusted-users = root @wheel ```
Owner

not a bug. auto-allocate-uids requires cgroups to work properly in all cases, so we changed the experimental feature to that effect.

not a bug. auto-allocate-uids requires cgroups to work properly in all cases, so we changed the experimental feature to that effect.
Author

Then it should imply cgroups, not suddenly start failing at runtime. The fact that you need to enable cgroups to use this feature is not even documented.

Then it should *imply* cgroups, not suddenly start failing at runtime. The fact that you need to enable cgroups to use this feature is [not even documented](https://docs.lix.systems/manual/lix/stable/command-ref/conf-file.html#conf-auto-allocate-uids).
Owner

yes, that angle is valid. both are experimental features though and we do not want to dump any of them onto folks silently without them realising, what with them being experimental and quite possibly going to break things when set. the check could happen a lot earlier though and give a better error message if it fails

yes, that angle is valid. both are experimental features though and we do not want to dump any of them onto folks silently without them realising, what with them being experimental and quite possibly going to break things when set. the check could happen a lot earlier though and give a better error message if it fails
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#1154
No description provided.