Cannot enable nonfree repo with config.nix?

I want to enable the nonfree repo so I can install steam, so I followed the instructions and put

{ allowUnfree = true; } in my ~/.config/nixpkgs/config.nix. But when I try to install steam again with nix-env -i steam, it just tells me the same message that I need to enable the nonfree repo. How do I fix this?

Hi,
it might be a “scope” problem, did you put the string inside

nixpkgs = {
  config = {
    allowUnfree = true;
  };
};

or direct with

nixpkgs.config.allowUnfree = true;

– Ingmar

I just put

{ allowUnfree = true; }

into ~/.config/nixpkgs/config.nix

Should I try one of those things?

Hi,

I just put

{ allowUnfree = true; }

into ~/.config/nixpkgs/config.nix

Should I try one of those things?
I’m on NixOS, as a relative newcomer, never used Nix on foreign
systems but… IMVHO yes, BTW it does not harm, you can always
change again/revert etc.

– Ingmar