Nixos How to change Kernel branch
First update the nix channel.
nix-channel --update
Then edit your configuration.nix and add the following line to select your kernel branch (the kernel branch has to be in the https://search.nixos.org/packages?channel=25.11&query=linux+kernel)
# Kernel
boot.kernelPackages = pkgs.linuxPackages_7_0;
I’ve selected the 7.0 branch which is the stable branch for now according to kernel.org. And in the end update your nixos and reboot :
nixos-rebuild boot
sudo reboot