Enabling cgroups breaks nix for non-root users #1088

Open
opened 2026-01-01 14:59:35 +00:00 by mweinelt · 0 comments
Member

Describe the bug

Enabling cgroups breaks running nix as a non-root allowed or trusted user.

error: Running all builds with cgroups requires privilege separation for build users but Lix is not configured to use build users.

Steps To Reproduce

  1. Enable the cgroups xp and opt into use-cgroups
  2. Add a non-root user to allowed-users
  3. Switch to that user and e.g. try to nix-store --realise /nix/store/23h28jbaikpckh51cjscs19jw6jffkx2-firefox-unwrapped-140.6.0esr-symbols
  4. See error

Expected behavior

Nix access should work for allowed and trusted users.

nix --version output

nix (Lix, like Nix) 2.95.0-pre20251223-dev_c0f1770
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: /root/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/root/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/root/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/root/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/yhkl6g46yb2gnaa60rd82ydixcnd00wg-lix-2.95.0-pre20251223-dev_c0f1770/share

Additional context

cc #537

## Describe the bug Enabling cgroups breaks running nix as a non-root `allowed` or `trusted` user. > error: Running all builds with cgroups requires privilege separation for build users but Lix is not configured to use build users. ## Steps To Reproduce 1. Enable the cgroups xp and opt into `use-cgroups` 2. Add a non-root user to `allowed-users` 3. Switch to that user and e.g. try to `nix-store --realise /nix/store/23h28jbaikpckh51cjscs19jw6jffkx2-firefox-unwrapped-140.6.0esr-symbols` 4. See error ## Expected behavior Nix access should work for allowed and trusted users. ## `nix --version` output ``` nix (Lix, like Nix) 2.95.0-pre20251223-dev_c0f1770 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: /root/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/root/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/root/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/root/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/yhkl6g46yb2gnaa60rd82ydixcnd00wg-lix-2.95.0-pre20251223-dev_c0f1770/share ``` ## Additional context cc #537
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#1088
No description provided.