my configuration.nix has this line:
nixpkgs.config.allowUnfree = true;
If you're using an additional nixpkgs, (I have both 24.11 and unstable) there's another syntax for that, depending on whether you use flakes. Anyway the above should work, flakes or not.
If not, post the error you're getting.