By default if installed (at least when installing Lix), nixpkgs points to the unstable channel.
To change this, open the file /etc/nix/nix.conf and edit the line starting with extra-nix-path = to this (might need a more up-to-date path)
extra-nix-path = nixpkgs=flake:nixpkgs/nixos-24.05