Then you could pass it with nix-build --arg extraConfig 'your-nix-expression-here'.
To override things that are predefined, you would need to play around with mkForce/ mkPriority (etc.)
I’m sure there’s better way to achieve this, but I believe this is a pretty simple solution.
overrideConfig is just my made up name to something I wish existed.
overrideAttrs would override stuff at the derivation level if I understand correctly.
That sounds quite complicated when it comes to the derivation of a NixOS system, especially for a one-liner.
And the my-file can be set to any string value (if I’m not mistaken) so it does not need to represent paths only. So that configuration may conditionally depend on the value given when evaluating.