How to upgrade to specific commit of nixpkgs

My autoUpgrade is failing with the error message

.../nixos-rebuild: unknown option `-I'

I see from that this issue has been fixed in commit 6dcfaeb32 in the GitHub repo of nixpkgs. How do I upgrade my system to that version?

Here are some of my settings:

$ sudo nix-channel --list
[sudo] password for ...
nixos https://channels.nixos.org/nixos-unstable

$ cat /etc/nixos/configuration.nix
...
system.autoUpgrade.enable = true;
system.autoUpgrade.allowReboot = true;
system.autoUpgrade.channel = "https://channels.nixos.org/nixos-unstable";
...

Thank you.

You really do not want to be upgrading to a nixpkgs commit that’s newer than the latest nixos-unstable. You’re going to get binary cache misses and end up compiling half your OS yourself. That commit will make it to nixos-unstable in the next day or two. Just be patient.

1 Like

That’s good. I’ll wait for the fix to make it to the channel then. Thank you.