How to set allowUnfree when useGlobalPkgs is true?

I know there are no silly questions, but this has got to be something ridiculously simple I am overlooking.

I am now including my home-manager configuration as a nixos module.

I have to admit I am enticed by the allure of useGlobalPkgs and its promise that it “saves an extra Nixpkgs evaluation, adds consistency, and removes the dependency on NIX_PATH, which is otherwise used for importing Nixpkgs.”

But if I do that, then where do I set nixpkgs.config.allowUnfree or, for that matter, nixpkgs.overlays?

In the system configurations equivalent options.

1 Like

Ugh. I was totally overthinking it, trying to put this in my flake. Instead, I just put the correct config in my nixos configuration, and all is well now. Thank you, @NobbZ !

So, instead of in the home-manager config, I put in configuration.nix:

nixpkgs.config.allowUnfree = true;
1 Like