Allow Unfree from Unstable

I have such a line in my 22.05:

  unstable = import (fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz) {};

, allowing me to grab some unstable packages, but not unfree ones.

How can I declare that I also want unfree packages from unstable, as I already have that declaration for 22.05?:wink:

Pass the config to the imported nixpkgs, eg:

unstable = import (fetchTarball …) {config.allowUnfree = true;};
3 Likes

allowUnfree as mentioned works, if you want to be more fine-grained you can use allowUnfreePredicate (Nixpkgs 22.11 manual)

2 Likes