Is it allowed to override a package without creating an overlay

Is it allowed to call .override on a package when installing it via systemPackages without creating an overlay for it?

environment.systemPackages = with pkgs; [
  somePackage.override { foo = bar; }

Sure. Just note:

  • If you’ve got anotherPackage that depends on somePackage then it will not see that override
  • you need to put parentheses around it otherwise nix will see a list containing a function and an attribute set and error out.