Closed bouk closed 5 months ago
What is the difference to setting config.nixpkgs.pkgs
?
I was trying to set some nixpkgs
options inside the VM configuration but then I get this error:
Failed assertions:
- Your system configures nixpkgs with an externally created instance. `nixpkgs.config` options should be passed when creating the instance instead.
Because the pkgs
option is passed to eval-config.nix
. So, I want to override pkgs
to be null
so doesn't set this pkgs
: https://github.com/NixOS/nixpkgs/blob/8c7a594e40bd450af9f029ff43525714831bd045/nixos/lib/eval-config.nix#L58-L61
And then I need to get a nixpkgs
reference somewhere to call eval-config
so I had to add the nixpkgs argument for it.
Thank you!
This allows settings pkgs = null in the microvm config so it instantiates a new package set. This way you can configure nixpkgs inside the NixOS configuration.
Also add a 'nixpkgs' config option to allow overriding the nixpkgs path.