Set priority of not-yet-installed package?

How can I set the priority of a package I want to install before installing?

With nix-env --set-flag priority, I can only set the priority of an already installed package. But if I e.g. want to install busybox with a low priority, how can I do this, without manually setting the priority of all packages busybox conflicts with?

That’s a really good question. The best approach that I know is done via nix code. Create an overlay to set the priority in the code:


  (self: super: {
    busybox = super.lowPrio super.busybox;
1 Like