llakala / nixos

My NixOS config
3 stars 1 forks source link

Configure `pkgs` and `pkgs-unstable` variables to use unfree within the configuration #48

Open llakala opened 2 weeks ago

llakala commented 2 weeks ago

We're currently creating pkgs and pkgs-unstable like this within our mkNixos function. We configure them on creation to allow unfree, and use our specified system.

However, it's been recommended by smart people to instead use stuff like nixpkgs.config.allowUnfree within the system. I'm fine with this.

However, I'm not sure on how this could hypothetically be done for pkgs-unstable. The nixpkgs options only reference, well, nixpkgs, not nixpkgs-unstable.

And, how would we even get pkgs-unstable into the specialArgs without using import nixpkgs-unstable? Maybe we would use that other way of grabbing it I've seen with legacyPackages?

I've been recommend to use the numtide nixpkgs wrapper. I'd prefer not to do this.

I see several options: