Skip to content

How to make changes to _module.args.pkgs available to hosts? #237

Closed Answered by roberth
z0al asked this question in Q&A
Discussion options

You must be logged in to vote

IIRC that allows nixpkgs.* to be set by modules, which means that some definitions that NixOS modules want to set will be ignored silently.
Ideally NixOS would detect specialArgs.pkgs and do this for you, but I'd recommend to import nixpkgs.nixosModules.readOnlyPkgs when you do that.

If you do want NixOS modules to further change your Nixpkgs package set, and specifically config, you could pass the overlay into nixpkgs.overlays. If you only need NixOS modules to set nixpkgs.overlays and not nixpkgs.config, you could set nixpkgs.pkgs + nixpkgs.overlays, but that's no more efficient than just passing the overlays without nixpkgs.pkgs.

This is way too confusing :(

Things to be improved

  • NixO…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@z0al
Comment options

Answer selected by z0al
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants