-
If I make changes to {
perSystem = { pkgs, system, ... }: {
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [ myOverlay ]; };
};
} These are not picked up automatically by The only way I could get it to work is to use withSystem "x86_64-linux" ({ system, pkgs, ... }:
inputs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit pkgs inputs; # <-- this
};
# ... rest of config omitted
} Is that the correct way to do things? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
IIRC that allows If you do want NixOS modules to further change your Nixpkgs package set, and specifically This is way too confusing :( Things to be improved
|
Beta Was this translation helpful? Give feedback.
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 importnixpkgs.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 intonixpkgs.overlays
. If you only need NixOS modules to setnixpkgs.overlays
and notnixpkgs.config
, you could setnixpkgs.pkgs
+nixpkgs.overlays
, but that's no more efficient than just passing the overlays withoutnixpkgs.pkgs
.This is way too confusing :(
Things to be improved