`nixos-option` disappeared from PATH after upgrade

I recently switched from the stable nixos-21.11 channel to the nixos-unstable channel (which currently points at 22.05pre345234.b2737d4980a), and after upgrading, i.e.

nixos-rebuild switch --upgrade

I noticed that I no longer have nixos-option on my PATH:

which nixos-option

which: no nixos-option in (/run/wrappers/bin:...

I rebooted into my previous profile and confirmed that nixos-option used to be available. On the unstable channel, I have to run nix-shell -p nixos-option to use it (or I could add it to environment.systemPackages).

I can’t find anything in the project’s recent history that would explain this. Can someone point me in the right direction?

1 Like

nixos-option is not compatible with nix versions 2.4 and upwards. the package has since been changed to explicitly depend on nix 2.3, but if someone’s config uses features that aren’t present in nix 2.3 it will break again.

1 Like

That explains it, thanks! Do you know whether there are plans to replace/revive it?

no idea :frowning: nixos-option is a rather smal C++ program though, so it might not even be that hard to fix once someone finds the time to try.