I’d like to apply an overlay at my nixpkgs registry, but can’t make it work. Is there a way to do this? Until now, I’ve been using nix.registry.nixpkgs.flake = nixpkgs; , nixpkgs being the flake input.
I tried using import nixpkgs { overlays = [ ( \* My overlay *\ ) ]; }, but it throws an error:
error: attribute 'currentSystem' missing
at /nix/store/wkavyf1xaqkpw8f74wig2h18f3mlr862-source/pkgs/top-level/impure.nix:18:43:
17| # (build, in GNU Autotools parlance) platform.
18| localSystem ? { system = args.system or builtins.currentSystem; }
| ^
19|
(use '--show-trace' to show detailed location information)
It is not possible to apply an overlay to the registry.
Registry expects a derivation/path of some sort which means that the only solution here is to patch nixpkgs
I don’t think “it’s not possible” is a satisfactory answer. If that’s the case, the implementation needs to be changed to make it possible, since this would seem to be the common use case. Simple things should be easy, etc.
@felipeqq2 tried import nixpkgs { overlays = [ ( \* My overlay *\ ) ]; } and got error: attribute 'currentSystem' missing. That’s because they didn’t provide a system argument, like import nixpkgs { system = "x86_64-linux"; overlays = [ ( \* My overlay *\ ) ]; }, which would have worked.