Admittedly my approach of
# some code omitted, see the blog post if you want more
nixpkgs_pin=$(nix-instantiate --eval ./npins -A nixpkgs.outPath |tr -d \")
nix_path="nixpkgs=${nixpkgs_pin}:nixos-config=${PWD}/configuration.nix"
env NIX_PATH="${nix_path}" nixos-rebuild "$cmd" --no-reexec "$@"
is just a long-winded end-run around ./lib/eval-config.nix or, in other words, an indirect way to make a wrapper.
That is why I’m interested in understanding your approach, as it seems better but I know there are parts that aren’t quite there in my mind haha.
I’m sorry, I don’t think I understand that. I thought the whole point of this PR was a way to use specialArgs, but you seem to say above that generally you don’t want to do this. For the second sentence, do you mean that there is a problem in creating an npin-able source that creates new options in the sense of the NixOS module imports/options/config triple without this PR?
I know it’s probably a pain to answer; thank you for your generosity in sharing your knowledge.