"trusted user" errors for every nix command on Arch

$ nix-env -u
warning: name collision in input Nix expressions, skipping '/home/spease/.nix-defexpr/channels_root/nixpkgs'
warning: ignoring the user-specified setting 'build-users-group', because it is a restricted setting and you are not a trusted user
warning: ignoring the user-specified setting 'sandbox-paths', because it is a restricted setting and you are not a trusted user
$ nix-channel --update
warning: ignoring the user-specified setting 'build-users-group', because it is a restricted setting and you are not a trusted user
warning: ignoring the user-specified setting 'sandbox-paths', because it is a restricted setting and you are not a trusted user
unpacking channels...
warning: ignoring the user-specified setting 'build-users-group', because it is a restricted setting and you are not a trusted user
warning: ignoring the user-specified setting 'sandbox-paths', because it is a restricted setting and you are not a trusted user
$ nix-shell
warning: ignoring the user-specified setting 'build-users-group', becaus
e it is a restricted setting and you are not a trusted user
warning: ignoring the user-specified setting 'sandbox-paths', because it
 is a restricted setting and you are not a trusted user

I’ve added my user to the nix-users and nixbld group and logged out and in.

What’s happening here, and is there a way to fix it? Thanks

It is not an error, those are warnings.

You have settings in your users ~/.config/nix/nix.conf which that user is now allowed to set. Either move them to the system configuration or make the user trusted or remove the settings completely, as they are currently ignored anyway.

Also you shouldn’t add your user to the nixbld group: Introduction - Nix Reference Manual

The build users are the special UIDs under which builds are performed. They should all be members of the build users group nixbld. This group should have no other members.

1 Like

Thanks, however I don’t have a ~/.config/nix/nix.conf

Thanks, I removed my user from nixbld

Perhaps I am missremembering the location. Is there any other file or link in ~/.config/nix?

I don’t have a ~/.config/nix folder at all

Then I’m wondering where this settings come from.

Any environment variables set that might change how nix treats itself?

$ env | grep NIX
NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixpkgs:/nix/var/nix/profiles/per-user/root/channels:/home/spease/.nix-defexpr/channels
NIX_PROFILES=/nix/var/nix/profiles/default /home/spease/.nix-profile

NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt