Skip to content

Nix daemon default allowed_users not working with wsl update #549

@Pleune

Description

@Pleune

I just updated a bunch of windows stuff, including to WSL 2.2.4.0:

WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.22631.4037

And my previously working nix config, as well as updating to the current commit (WSL cc84991 and nixpkgs c04d5652) now no longer lets me run nix commands without sudo, with the error error: cannot connect to socket at '/nix/var/nix/daemon-socket/socket': Connection refused

I don't know what would be causing this, but adding nix.settings.allowed_users = [ "@users" ]; fixes the issue. The default "*" does not work for some reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions