nixos/nixpkgs: assert that nixpkgs.config is not set when pkgs is passed in externally

This is a common footgun people hit often. Remove it.

K900 ce87196a cdb6bfea

+10
+10
nixos/modules/misc/nixpkgs.nix
··· 383 383 the legacy definitions. 384 384 ''; 385 385 } 386 + { 387 + assertion = opt.pkgs.isDefined -> cfg.config == {}; 388 + message = '' 389 + Your system configures nixpkgs with an externally created instance. 390 + `nixpkgs.config` options should be passed when creating the instance instead. 391 + 392 + Current value: 393 + ${lib.generators.toPretty { multiline = true; } opt.config} 394 + ''; 395 + } 386 396 ]; 387 397 }; 388 398