First, let me set a few things straight that will hopefully help you understand some NixOS and Nixpkgs concepts.
NixOS modules are mostly concerned with system configuration, whereas overlays are a mostly just a mechanism for making changes to the package set. These are separate features of two separate components (NixOS and Nixpkgs) that are distributed together.
What happens is that NixOS loads Nixpkgs when it evaluates. This can be controlled with some NixOS options. Most of these are simply passed to the Nixpkgs function (usually denoted import <nixpkgs>
).
This means that NixOS configuration is in control of the config
argument to Nixpkgs. However, overlays
is merely another parameter of the Nixpkgs function that does not influence the Nixpkgs config
.
Also note that self
and super
are just names that are typically given to the parameters of the function that defines an overlay. They are positional parameters, so you could give them different names if you need to. The result of an overlay function is an attribute set containing the attributes to add or update. self
and super
have no special meaning as attributes in Nixpkgs. (Although you did hide the super
package)
So no, an overlay can not set a Nixpkgs config item. You may instead want to write a NixOS module instead. NixOS modules and NixOS configuration are the same thing.
Also note that NixOS (nixos-rebuild
, etc) will not read ~/.config/nixpkgs/config.nix
. It has it's own default.
meta.knownVulnerabilities
. That way you don't need to usepermittedInsecurePackages
at all.webkitgtk24x-gtk2 = self.webkitgtk.override { meta = { knownVulnerabilities = []; }; };
in the claws-mail override, but this and various incantations complain that meta is an unexpected argument to the override.override
doesn't work there becausemeta
isn't in the argument list forwebkitgtk
(look at the top of the file -- the big{ ... }
list is the arguments it takes).overrideAttrs
will do the trick.permittedInsecurePackages
globally true).