I need to install exact kernel version to bisect a bug. I’ve tried to set the version in my /etc/nixos/configuration.nix like:
nixpkgs.config.packageOverrides = pkgs : {
linux = pkgs.linux.override {version="4.19.60";};
};
nixos-rebuild switch doesn’t seem to do anything:
$ file /nix/var/nix/profiles/system/kernel
/nix/var/nix/profiles/system/kernel: symbolic link to /nix/store/0n0j02amv1vayml7qr7nlrl8rzrycgyf-linux-4.19.63/bzImage
Ah sorry! You’re right it’s not actually building the custom version, just rebuilding the old version with the same source. I think overriding the src like this would work:
OT: why does this not trigger a build error? Shouldn’t this trigger a fetch (since the hash will be different and therefore won’t be found in the store), and fail when the checksum doesn’t match?