`nix run` does not install unfree packages, NIXPKGS_ALLOW_UNFREE doesn't seem to help

When I try to use nix run to try out Postman via nix run nixpkgs#postman I get the following output:

Package ‘postman-7.36.1’ in /nix/store/vyivf65nczfgh51qwiw50m8pgr0p9yna-source/pkgs/development/web/postman/default.nix:98 has an unfree license (‘postman’), refusing to evaluate.

a) To temporarily allow unfree packages, you can use an environment variable
   for a single invocation of the nix tools.

     $ export NIXPKGS_ALLOW_UNFREE=1

b) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

Alternatively you can configure a predicate to allow specific packages:
  { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [

c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.

(use '--show-trace' to show detailed location information)

Makes sense. The problem is, the suggested mitigations don’t work. I tried prepending NIXPKGS_ALLOW_UNFREE=1 to the command, using an export directly as suggested, and my ~/.config/nixpkgs/config.nix file already has allowUnfree = true; set.

I did see this topic but I don’t think it applies here, since my problem is that an error message seems to be giving me bad information.

Can you help me figure out what’s going wrong? Thanks!


These instructions do not work with flakes. You should use stable nix or run it with --impure flag so it could load environment variables or config.nix. Try nix run nixpkgs#postman --impure.


Thank you, that worked!