user for remote builds fails if its group is nixbld #1069

Open
opened 2025-12-08 15:20:28 +00:00 by crop · 0 comments

Describe the bug

when one setup a user specifically for remote builds but i put as group nixbld the authentication of the build user fails in the daemon.

Steps To Reproduce

  users.users.nixremote = {
    enable = true;
    isSystemUser = true;
    description = "Nix build user (restricted)";
    group = "nixbld";
    extraGroups = [ "nixbld" ];
    useDefaultShell = true;
    createHome = false;
    openssh.authorizedKeys.keys = [ "ssh-ed25519 ..." ];
  };

this lead to the problem the the daemon failed with:

Dec 08 03:08:03 silent nix-daemon[1329]: error: error processing connection: user 'nixbld' is not allowed to connect to the Nix daemon

Expected behavior

Dec 08 12:56:52 silent nix-daemon[20189]: accepted connection from pid 25127, user nixremote (trusted)

it works if the group is named like the user (haven't tried anything else

nix --version output

 nix --version
nix (Lix, like Nix) 2.93.3
System type: x86_64-linux
Additional system types: aarch64-linux, i686-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/kg6pv5f01vj5w6k7scy2zfvnkcgbifcw-lix-2.93.3/share

Additional context

 nix show-config|grep trusted-users
trusted-users = root nixremote

Add any other context about the problem here.

## Describe the bug when one setup a user specifically for remote builds but i put as group `nixbld` the authentication of the build user fails in the daemon. ## Steps To Reproduce ``` users.users.nixremote = { enable = true; isSystemUser = true; description = "Nix build user (restricted)"; group = "nixbld"; extraGroups = [ "nixbld" ]; useDefaultShell = true; createHome = false; openssh.authorizedKeys.keys = [ "ssh-ed25519 ..." ]; }; ``` this lead to the problem the the daemon failed with: `Dec 08 03:08:03 silent nix-daemon[1329]: error: error processing connection: user 'nixbld' is not allowed to connect to the Nix daemon` ## Expected behavior `Dec 08 12:56:52 silent nix-daemon[20189]: accepted connection from pid 25127, user nixremote (trusted)` it works if the group is named like the user (haven't tried anything else ## `nix --version` output ``` nix --version nix (Lix, like Nix) 2.93.3 System type: x86_64-linux Additional system types: aarch64-linux, i686-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/kg6pv5f01vj5w6k7scy2zfvnkcgbifcw-lix-2.93.3/share ``` ## Additional context ``` nix show-config|grep trusted-users trusted-users = root nixremote ``` Add any other context about the problem here.
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#1069
No description provided.